[llvm] [SDAG] Freeze condition in select of load fold (PR #208683)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 04:27:20 PDT 2026


================
@@ -172,8 +172,10 @@ define i32 @selecti8i32(i8 %a) {
 define i32 @icmpasreq(i32 %input, i32 %a, i32 %b) {
 ; X86-LABEL: icmpasreq:
 ; X86:       # %bb.0:
-; X86-NEXT:    cmpl $0, {{[0-9]+}}(%esp)
-; X86-NEXT:    js .LBB8_1
+; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT:    sarl $31, %eax
+; X86-NEXT:    cmpl $-1, %eax
+; X86-NEXT:    je .LBB8_1
----------------
RKSimon wrote:

IIRC this is just to avoid a RISCV regression - at what point do we take the regression for improvements everywhere else?

https://github.com/llvm/llvm-project/pull/208683


More information about the llvm-commits mailing list