[llvm-branch-commits] [llvm] release 18.x [X86] Fix miscompile in combineShiftRightArithmetic (#86597) (PR #86728)

2024-03-26 Thread via llvm-branch-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/86728 >From 0cb47c1dfda89f97725d5855429eb037be7f90ef Mon Sep 17 00:00:00 2001 From: Rose Date: Tue, 26 Mar 2024 16:34:09 -0400 Subject: [PATCH 1/2] [X86] Pre-commit tests (NFC) --- llvm/test/CodeGen/X86/sar_fold.

[llvm-branch-commits] [llvm] release 18.x [X86] Fix miscompile in combineShiftRightArithmetic (#86597) (PR #86728)

2024-03-26 Thread via llvm-branch-commits
=?utf-8?q?Björn?= Pettersson Message-ID: In-Reply-To: https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/86728 >From bd0c822c3bf356b4dc8ddc0a7449e199c44ce840 Mon Sep 17 00:00:00 2001 From: Rose Date: Tue, 26 Mar 2024 16:34:09 -0400 Subject: [PATCH 1/2] [X86] Pre

[llvm-branch-commits] [llvm] release 18.x [X86] Fix miscompile in combineShiftRightArithmetic (#86597) (PR #86728)

2024-03-26 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: AtariDreams (AtariDreams) Changes When folding (ashr (shl, x, c1), c2) we need to treat c1 and c2 as unsigned to find out if the combined shift should be a left or right shift. Also do an early out during pre-legalization in case c1

[llvm-branch-commits] [llvm] release 18.x [X86] Fix miscompile in combineShiftRightArithmetic (#86597) (PR #86728)

2024-03-26 Thread via llvm-branch-commits
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/86728 When folding (ashr (shl, x, c1), c2) we need to treat c1 and c2 as unsigned to find out if the combined shift should be a left or right shift. Also do an early out during pre-legalization in case c1 and c2 ha