[llvm] DAG: Handle lowering unordered compare with inf (PR #100378)
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 10:53:38 PDT 2024
================
@@ -240,18 +240,22 @@ entry:
define i1 @isfinite_f(float %x) {
; X86-LABEL: isfinite_f:
; X86: # %bb.0: # %entry
-; X86-NEXT: movl $2147483647, %eax # imm = 0x7FFFFFFF
-; X86-NEXT: andl {{[0-9]+}}(%esp), %eax
-; X86-NEXT: cmpl $2139095040, %eax # imm = 0x7F800000
-; X86-NEXT: setl %al
+; X86-NEXT: flds {{[0-9]+}}(%esp)
----------------
spavloff wrote:
It looks like for targets like X86 this behavior is bad. As it requires materialization of infinity value, it produces worse code.
Is there an example when this patch is profitable?
Can we confine this behavior to the profitable cases?
https://github.com/llvm/llvm-project/pull/100378
More information about the llvm-commits
mailing list