[llvm] [VectorCombine][X86] Use updated getVectorInstrCost hook (PR #137823)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu May 8 03:22:16 PDT 2025


================
@@ -546,8 +561,8 @@ define <2 x i64> @xor_constant_not_undef_lane(i64 %x) {
 
 define <2 x double> @fadd_constant(double %x) {
 ; CHECK-LABEL: @fadd_constant(
-; CHECK-NEXT:    [[BO_SCALAR:%.*]] = fadd double [[X:%.*]], 4.200000e+01
-; CHECK-NEXT:    [[BO:%.*]] = insertelement <2 x double> <double 0x7FF8000000000000, double undef>, double [[BO_SCALAR]], i64 0
+; CHECK-NEXT:    [[INS:%.*]] = insertelement <2 x double> undef, double [[X:%.*]], i32 0
+; CHECK-NEXT:    [[BO:%.*]] = fadd <2 x double> [[INS]], <double 4.200000e+01, double undef>
----------------
lukel97 wrote:

Leaving a note here that this still generates the same code ultimately because DAGCombine will scalarize it either way

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


More information about the llvm-commits mailing list