[llvm] [X86] Try Folding icmp of v8i32 -> fcmp of v8f32 on AVX (PR #82290)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 10:00:29 PST 2024
================
@@ -10,10 +10,11 @@
define <8 x i16> @pr25080(<8 x i32> %a) {
; AVX1-LABEL: pr25080:
; AVX1: # %bb.0: # %entry
+; AVX1-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
+; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
-; AVX1-NEXT: vpand {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
-; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
-; AVX1-NEXT: vpcmpeqd %xmm1, %xmm0, %xmm0
+; AVX1-NEXT: vxorps %xmm1, %xmm1, %xmm1
+; AVX1-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
----------------
RKSimon wrote:
Still not perfect, but I'm not sure how much more we should try to do.
Maybe worth folding `extract_subvector(sint_to_fp())` -> `sint_to_fp(extract_subvector())`, but not sure if we should bother folding the vcmpeqps back to vpcmpeq again....
https://github.com/llvm/llvm-project/pull/82290
More information about the llvm-commits
mailing list