@@ -55,15 +55,40 @@ define <vscale x 8 x i16> @dupx_splat_convert(i16 %s) #0 {
5555 ret <vscale x 8 x i16 > %splat
5656}
5757
58- declare <vscale x 8 x i16 > @llvm.aarch64.sve.dup.x.nxv8i16 (i16 )
58+ define <vscale x 16 x i8 > @dup_all_active_i8 (<vscale x 16 x i8 > %v , i8 %s ) #0 {
59+ ; CHECK-LABEL: @dup_all_active_i8(
60+ ; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[S:%.*]], i64 0
61+ ; CHECK-NEXT: [[INSERT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
62+ ; CHECK-NEXT: ret <vscale x 16 x i8> [[INSERT]]
63+ ;
64+ %insert = tail call <vscale x 16 x i8 > @llvm.aarch64.sve.dup.nxv16i8 (<vscale x 16 x i8 > %v , <vscale x 16 x i1 > splat(i1 true ), i8 %s )
65+ ret <vscale x 16 x i8 > %insert
66+ }
5967
60- declare <vscale x 16 x i8 > @llvm.aarch64.sve.dup.nxv16i8 (<vscale x 16 x i8 >, <vscale x 16 x i1 >, i8 )
61- declare <vscale x 8 x i16 > @llvm.aarch64.sve.dup.nxv8i16 (<vscale x 8 x i16 >, <vscale x 8 x i1 >, i16 )
68+ define <vscale x 4 x i32 > @dup_all_active_i32 (<vscale x 4 x i32 > %v ) #0 {
69+ ; CHECK-LABEL: @dup_all_active_i32(
70+ ; CHECK-NEXT: ret <vscale x 4 x i32> splat (i32 73)
71+ ;
72+ %insert = tail call <vscale x 4 x i32 > @llvm.aarch64.sve.dup.nxv4i32 (<vscale x 4 x i32 > %v , <vscale x 4 x i1 > splat(i1 true ), i32 73 )
73+ ret <vscale x 4 x i32 > %insert
74+ }
6275
63- declare <vscale x 16 x i1 > @llvm.aarch64.sve.ptrue.nxv16i1 (i32 )
64- declare <vscale x 8 x i1 > @llvm.aarch64.sve.ptrue.nxv8i1 (i32 )
76+ define <vscale x 4 x float > @dup_all_active_f32 (<vscale x 4 x float > %v , float %s ) #0 {
77+ ; CHECK-LABEL: @dup_all_active_f32(
78+ ; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x float> poison, float [[S:%.*]], i64 0
79+ ; CHECK-NEXT: [[INSERT:%.*]] = shufflevector <vscale x 4 x float> [[DOTSPLATINSERT]], <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
80+ ; CHECK-NEXT: ret <vscale x 4 x float> [[INSERT]]
81+ ;
82+ %insert = tail call <vscale x 4 x float > @llvm.aarch64.sve.dup.nxv4f32 (<vscale x 4 x float > %v , <vscale x 4 x i1 > splat(i1 true ), float %s )
83+ ret <vscale x 4 x float > %insert
84+ }
6585
66- declare <vscale x 16 x i1 > @llvm.aarch64.sve.convert.to.svbool.nxv8i1 (<vscale x 8 x i1 >)
67- declare <vscale x 8 x i1 > @llvm.aarch64.sve.convert.from.svbool.nxv8i1 (<vscale x 16 x i1 >)
86+ define <vscale x 2 x double > @dup_all_active_f64 (<vscale x 2 x double > %v ) #0 {
87+ ; CHECK-LABEL: @dup_all_active_f64(
88+ ; CHECK-NEXT: ret <vscale x 2 x double> splat (double 1.000000e+00)
89+ ;
90+ %insert = tail call <vscale x 2 x double > @llvm.aarch64.sve.dup.nxv2f64 (<vscale x 2 x double > %v , <vscale x 2 x i1 > splat(i1 true ), double 1 .0 )
91+ ret <vscale x 2 x double > %insert
92+ }
6893
6994attributes #0 = { "target-features" ="+sve" }
0 commit comments