File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -466,3 +466,16 @@ define i2 @constant_multiplied_7xi2(i2 %0) {
466466 %4 = tail call i2 @llvm.vector.reduce.add.v7i2 (<7 x i2 > %3 )
467467 ret i2 %4
468468}
469+
470+ define i32 @negative_scalable_vector (i32 %0 ) {
471+ ; CHECK-LABEL: @negative_scalable_vector(
472+ ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[TMP0:%.*]], i64 0
473+ ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <vscale x 4 x i32> [[TMP2]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
474+ ; CHECK-NEXT: [[TMP4:%.*]] = tail call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> [[TMP3]])
475+ ; CHECK-NEXT: ret i32 [[TMP4]]
476+ ;
477+ %2 = insertelement <vscale x 4 x i32 > poison, i32 %0 , i64 0
478+ %3 = shufflevector <vscale x 4 x i32 > %2 , <vscale x 4 x i32 > poison, <vscale x 4 x i32 > zeroinitializer
479+ %4 = tail call i32 @llvm.vector.reduce.add.nxv4i32 (<vscale x 4 x i32 > %3 )
480+ ret i32 %4
481+ }
You can’t perform that action at this time.
0 commit comments