[llvm] [X86] ICMP EQ/NE MIN_SIGNED_INT - avoid immediate argument by using NEG + SETO/SETNO (PR #94948)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 19:15:36 PDT 2024
================
@@ -954,15 +955,16 @@ entry:
define i1 @not_is_minus_zero_f(float %x) {
; CHECK-32-LABEL: not_is_minus_zero_f:
; CHECK-32: # %bb.0: # %entry
-; CHECK-32-NEXT: cmpl $-2147483648, {{[0-9]+}}(%esp) # imm = 0x80000000
-; CHECK-32-NEXT: setne %al
+; CHECK-32-NEXT: xorl %eax, %eax
+; CHECK-32-NEXT: cmpl {{[0-9]+}}(%esp), %eax
----------------
KanRobert wrote:
I think this can be a `negl {{[0-9]+}}(%esp), %eax` when NDD is available.
https://github.com/llvm/llvm-project/pull/94948
More information about the llvm-commits
mailing list