[llvm] [X86] Try Folding icmp of v8i32 -> fcmp of v8f32 on AVX (PR #82290)

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 08:10:10 PST 2024


================
@@ -861,6 +861,9 @@ define <8 x i32> @v8i32(<8 x i32> %x, <8 x i32> %y) nounwind {
 ; AVX1-NEXT:    vpcmpgtd %xmm2, %xmm3, %xmm3
 ; AVX1-NEXT:    vpcmpgtd %xmm4, %xmm0, %xmm0
 ; AVX1-NEXT:    vinsertf128 $1, %xmm3, %ymm0, %ymm0
+; AVX1-NEXT:    vcvtdq2ps %ymm1, %ymm1
+; AVX1-NEXT:    vpxor %xmm3, %xmm3, %xmm3
+; AVX1-NEXT:    vcmpltps %ymm3, %ymm1, %ymm1
----------------
goldsteinn wrote:

I would think it would be folded earlier? Is there a place I could move this change too s.t it would be after all simplifications but still have reasonable access to `KnownBits`?

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


More information about the llvm-commits mailing list