@@ -2667,15 +2667,10 @@ define [4 x float] @constant_aggregate_zero() {
26672667}
26682668
26692669define <vscale x 4 x float > @scalable_splat_pnorm () {
2670- ; CHECK-CV: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
2671- ; CHECK-CV-LABEL: define noundef <vscale x 4 x float> @scalable_splat_pnorm
2672- ; CHECK-CV-SAME: () #[[ATTR3]] {
2673- ; CHECK-CV-NEXT: ret <vscale x 4 x float> splat (float 1.000000e+00)
2674- ;
2675- ; CHECK-CI: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
2676- ; CHECK-CI-LABEL: define noundef nofpclass(nan inf zero sub nnorm) <vscale x 4 x float> @scalable_splat_pnorm
2677- ; CHECK-CI-SAME: () #[[ATTR3]] {
2678- ; CHECK-CI-NEXT: ret <vscale x 4 x float> splat (float 1.000000e+00)
2670+ ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
2671+ ; CHECK-LABEL: define noundef nofpclass(nan inf zero sub nnorm) <vscale x 4 x float> @scalable_splat_pnorm
2672+ ; CHECK-SAME: () #[[ATTR3]] {
2673+ ; CHECK-NEXT: ret <vscale x 4 x float> splat (float 1.000000e+00)
26792674;
26802675 ret <vscale x 4 x float > splat (float 1 .0 )
26812676}
@@ -2689,6 +2684,19 @@ define <vscale x 4 x float> @scalable_splat_zero() {
26892684 ret <vscale x 4 x float > zeroinitializer
26902685}
26912686
2687+ define <vscale x 4 x float > @scalable_splat_nnan (float nofpclass(nan) %x ) {
2688+ ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
2689+ ; CHECK-LABEL: define nofpclass(nan) <vscale x 4 x float> @scalable_splat_nnan
2690+ ; CHECK-SAME: (float nofpclass(nan) [[X:%.*]]) #[[ATTR3]] {
2691+ ; CHECK-NEXT: [[HEAD:%.*]] = insertelement <vscale x 4 x float> poison, float [[X]], i32 0
2692+ ; CHECK-NEXT: [[SPLAT:%.*]] = shufflevector <vscale x 4 x float> [[HEAD]], <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
2693+ ; CHECK-NEXT: ret <vscale x 4 x float> [[SPLAT]]
2694+ ;
2695+ %head = insertelement <vscale x 4 x float > poison, float %x , i32 0
2696+ %splat = shufflevector <vscale x 4 x float > %head , <vscale x 4 x float > poison, <vscale x 4 x i32 > zeroinitializer
2697+ ret <vscale x 4 x float > %splat
2698+ }
2699+
26922700; Verify we do not derive 'nofpclass(inf zero sub norm)' for the argument __x.
26932701; See https://github.com/llvm/llvm-project/issues/78507
26942702
@@ -2989,5 +2997,7 @@ attributes #5 = { "denormal-fp-math"="ieee,positive-zero" }
29892997;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
29902998; CGSCC-CI: {{.*}}
29912999; CGSCC-CV: {{.*}}
3000+ ; CHECK-CI: {{.*}}
3001+ ; CHECK-CV: {{.*}}
29923002; TUNIT-CI: {{.*}}
29933003; TUNIT-CV: {{.*}}
0 commit comments