[llvm] [X86] ICMP EQ/NE MIN_SIGNED_INT - avoid immediate argument by using NEG + SETO/SETNO (PR #94948)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 01:31:43 PDT 2024


================
@@ -783,29 +783,28 @@ define i16 @test_minsigned_i16(i16 %a0, i16 %a1) nounwind {
 define i32 @test_minsigned_i32(i32 %a0, i32 %a1) nounwind {
 ; X64-LABEL: test_minsigned_i32:
 ; X64:       # %bb.0:
-; X64-NEXT:    cmpl $-2147483648, %edi # imm = 0x80000000
-; X64-NEXT:    jne .LBB19_1
+; X64-NEXT:    movl %edi, %eax
----------------
phoebewang wrote:

I think this will increase register pressure. Should we check one use of it?

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


More information about the llvm-commits mailing list