@@ -938,6 +938,28 @@ define <2 x i32> @shl_splat_constant1(<2 x i32> %x) {
938
938
ret <2 x i32 > %r
939
939
}
940
940
941
+ define <vscale x 2 x i32 > @shl_splat_constant0_scalable (<vscale x 2 x i32 > %x ) {
942
+ ; CHECK-LABEL: @shl_splat_constant0_scalable(
943
+ ; CHECK-NEXT: [[TMP1:%.*]] = shl <vscale x 2 x i32> splat (i32 5), [[X:%.*]]
944
+ ; CHECK-NEXT: [[R:%.*]] = shufflevector <vscale x 2 x i32> [[TMP1]], <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
945
+ ; CHECK-NEXT: ret <vscale x 2 x i32> [[R]]
946
+ ;
947
+ %splat = shufflevector <vscale x 2 x i32 > %x , <vscale x 2 x i32 > undef , <vscale x 2 x i32 > zeroinitializer
948
+ %r = shl <vscale x 2 x i32 > splat (i32 5 ), %splat
949
+ ret <vscale x 2 x i32 > %r
950
+ }
951
+
952
+ define <vscale x 2 x i32 > @shl_splat_constant1_scalable (<vscale x 2 x i32 > %x ) {
953
+ ; CHECK-LABEL: @shl_splat_constant1_scalable(
954
+ ; CHECK-NEXT: [[TMP1:%.*]] = shl <vscale x 2 x i32> [[X:%.*]], splat (i32 5)
955
+ ; CHECK-NEXT: [[R:%.*]] = shufflevector <vscale x 2 x i32> [[TMP1]], <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
956
+ ; CHECK-NEXT: ret <vscale x 2 x i32> [[R]]
957
+ ;
958
+ %splat = shufflevector <vscale x 2 x i32 > %x , <vscale x 2 x i32 > undef , <vscale x 2 x i32 > zeroinitializer
959
+ %r = shl <vscale x 2 x i32 > %splat , splat (i32 5 )
960
+ ret <vscale x 2 x i32 > %r
961
+ }
962
+
941
963
define <2 x i32 > @ashr_splat_constant0 (<2 x i32 > %x ) {
942
964
; CHECK-LABEL: @ashr_splat_constant0(
943
965
; CHECK-NEXT: [[TMP1:%.*]] = lshr <2 x i32> <i32 5, i32 poison>, [[X:%.*]]
0 commit comments