[llvm] [X86] Transform `(xor x, SIGN_BIT)` -> `(add x, SIGN_BIT)` 32 bit and smaller scalars (PR #83659)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 2 17:33:24 PST 2024


================
@@ -124,9 +124,9 @@ define <2 x float> @fneg_bitcast(i64 %i) nounwind {
 ; X86-SSE1-NEXT:    subl $16, %esp
 ; X86-SSE1-NEXT:    movl $-2147483648, %eax # imm = 0x80000000
 ; X86-SSE1-NEXT:    movl 12(%ebp), %ecx
-; X86-SSE1-NEXT:    xorl %eax, %ecx
+; X86-SSE1-NEXT:    addl %eax, %ecx
----------------
topperc wrote:

Why didn't the load or the immediate fold into this instruction?

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


More information about the llvm-commits mailing list