[llvm] [X86] Fix redundant zeroing operations when casting ints to FP vectors (PR #212065)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 26 10:04:36 PDT 2026


================
@@ -7382,6 +7382,15 @@ def : Pat<(f64 (any_sint_to_fp GR32:$src)),
 def : Pat<(f64 (any_sint_to_fp GR64:$src)),
           (VCVTSI642SDZrr (f64 (IMPLICIT_DEF)), GR64:$src)>;
 
+def : Pat<(v4f32 (X86vzmovl (v4f32 (scalar_to_vector (f32 (any_sint_to_fp GR32:$src)))))),
+          (VCVTSI2SSZrr_Int (v4f32 (V_SET0)), GR32:$src)>;
----------------
RKSimon wrote:

these should be using `AVX512_128_SET0` to allow them to use the xmm16-31

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


More information about the llvm-commits mailing list