[llvm] [SLP] Vectorize full insertvalue buildvector sequences (PR #200274)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 03:13:33 PDT 2026


================
@@ -15,12 +16,9 @@ define { i64, i64 } @patatino(double %arg) {
 ; CHECK-NEXT:    [[TMP6:%.*]] = load <2 x double>, ptr getelementptr inbounds ([6 x double], ptr @global, i64 0, i64 4), align 16
 ; CHECK-NEXT:    [[TMP7:%.*]] = fadd <2 x double> [[TMP6]], [[TMP5]]
 ; CHECK-NEXT:    [[TMP8:%.*]] = fptosi <2 x double> [[TMP7]] to <2 x i32>
-; CHECK-NEXT:    [[TMP9:%.*]] = extractelement <2 x i32> [[TMP8]], i32 0
-; CHECK-NEXT:    [[TMP10:%.*]] = sext i32 [[TMP9]] to i64
-; CHECK-NEXT:    [[T16:%.*]] = insertvalue { i64, i64 } undef, i64 [[TMP10]], 0
-; CHECK-NEXT:    [[TMP11:%.*]] = extractelement <2 x i32> [[TMP8]], i32 1
-; CHECK-NEXT:    [[TMP12:%.*]] = sext i32 [[TMP11]] to i64
-; CHECK-NEXT:    [[T17:%.*]] = insertvalue { i64, i64 } [[T16]], i64 [[TMP12]], 1
+; CHECK-NEXT:    [[TMP9:%.*]] = sext <2 x i32> [[TMP8]] to <2 x i64>
+; CHECK-NEXT:    store <2 x i64> [[TMP9]], ptr [[VEC2STRUCT_SLOT]], align 16
+; CHECK-NEXT:    [[T17:%.*]] = load { i64, i64 }, ptr [[VEC2STRUCT_SLOT]], align 16
----------------
RKSimon wrote:

why is this a STLF pattern and not a bitcast?

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


More information about the llvm-commits mailing list