@@ -100,14 +100,24 @@ define <2 x double> @returned_strange_constant_vector_elt() {
100
100
ret <2 x double > <double -0 .0 , double bitcast (i64 ptrtoint (ptr @unknown to i64 ) to double )>
101
101
}
102
102
103
- ; Test a vector element that's an undef/poison
103
+ ; Test a vector element that's undef
104
104
define <3 x double > @returned_undef_constant_vector_elt () {
105
- ; CHECK-LABEL: define nofpclass(nan inf pzero sub norm) <3 x double> @returned_undef_constant_vector_elt() {
105
+ ; CHECK-LABEL: define nofpclass(nan inf sub norm) <3 x double> @returned_undef_constant_vector_elt() {
106
106
; CHECK-NEXT: call void @unknown()
107
- ; CHECK-NEXT: ret <3 x double> <double -0.000000e+00, double poison , double undef>
107
+ ; CHECK-NEXT: ret <3 x double> <double -0.000000e+00, double 0.000000e+00 , double undef>
108
108
;
109
109
call void @unknown ()
110
- ret <3 x double > <double -0 .0 , double poison, double undef >
110
+ ret <3 x double > <double -0 .0 , double 0 .0 , double undef >
111
+ }
112
+
113
+ ; Test a vector element that's poison
114
+ define <3 x double > @returned_poison_constant_vector_elt () {
115
+ ; CHECK-LABEL: define nofpclass(nan inf sub norm) <3 x double> @returned_poison_constant_vector_elt() {
116
+ ; CHECK-NEXT: call void @unknown()
117
+ ; CHECK-NEXT: ret <3 x double> <double -0.000000e+00, double 0.000000e+00, double poison>
118
+ ;
119
+ call void @unknown ()
120
+ ret <3 x double > <double -0 .0 , double 0 .0 , double poison>
111
121
}
112
122
113
123
define <2 x double > @returned_qnan_zero_vector () {
@@ -1790,6 +1800,32 @@ define float @shufflevector_extractelt3(<2 x float> %arg0, <2 x float> nofpclass
1790
1800
ret float %extract
1791
1801
}
1792
1802
1803
+ define float @shufflevector_constantdatavector_demanded0 () {
1804
+ ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
1805
+ ; CHECK-LABEL: define nofpclass(snan inf nzero sub nnorm) float @shufflevector_constantdatavector_demanded0
1806
+ ; CHECK-SAME: () #[[ATTR3]] {
1807
+ ; CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <3 x float> <float 1.000000e+00, float 0x7FF8000000000000, float 0.000000e+00>, <3 x float> poison, <2 x i32> <i32 0, i32 2>
1808
+ ; CHECK-NEXT: [[EXTRACT:%.*]] = extractelement <2 x float> [[SHUFFLE]], i32 0
1809
+ ; CHECK-NEXT: ret float [[EXTRACT]]
1810
+ ;
1811
+ %shuffle = shufflevector <3 x float > <float 1 .0 , float 0x7FF8000000000000 , float 0 .0 >, <3 x float > poison, <2 x i32 > <i32 0 , i32 2 >
1812
+ %extract = extractelement <2 x float > %shuffle , i32 0
1813
+ ret float %extract
1814
+ }
1815
+
1816
+ define float @shufflevector_constantdatavector_demanded1 () {
1817
+ ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
1818
+ ; CHECK-LABEL: define nofpclass(snan inf nzero sub nnorm) float @shufflevector_constantdatavector_demanded1
1819
+ ; CHECK-SAME: () #[[ATTR3]] {
1820
+ ; CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <3 x float> <float 1.000000e+00, float 0x7FF8000000000000, float 0.000000e+00>, <3 x float> poison, <2 x i32> <i32 0, i32 2>
1821
+ ; CHECK-NEXT: [[EXTRACT:%.*]] = extractelement <2 x float> [[SHUFFLE]], i32 1
1822
+ ; CHECK-NEXT: ret float [[EXTRACT]]
1823
+ ;
1824
+ %shuffle = shufflevector <3 x float > <float 1 .0 , float 0x7FF8000000000000 , float 0 .0 >, <3 x float > poison, <2 x i32 > <i32 0 , i32 2 >
1825
+ %extract = extractelement <2 x float > %shuffle , i32 1
1826
+ ret float %extract
1827
+ }
1828
+
1793
1829
define i32 @fptosi (float nofpclass(inf nan) %arg ) {
1794
1830
; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
1795
1831
; CHECK-LABEL: define i32 @fptosi
@@ -2606,6 +2642,33 @@ bb:
2606
2642
ret float %implement.pow
2607
2643
}
2608
2644
2645
+ define [4 x float ] @constant_aggregate_zero () {
2646
+ ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
2647
+ ; CHECK-LABEL: define [4 x float] @constant_aggregate_zero
2648
+ ; CHECK-SAME: () #[[ATTR3]] {
2649
+ ; CHECK-NEXT: ret [4 x float] zeroinitializer
2650
+ ;
2651
+ ret [4 x float ] zeroinitializer
2652
+ }
2653
+
2654
+ define <vscale x 4 x float > @scalable_splat_pnorm () {
2655
+ ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
2656
+ ; CHECK-LABEL: define <vscale x 4 x float> @scalable_splat_pnorm
2657
+ ; CHECK-SAME: () #[[ATTR3]] {
2658
+ ; CHECK-NEXT: ret <vscale x 4 x float> shufflevector (<vscale x 4 x float> insertelement (<vscale x 4 x float> poison, float 1.000000e+00, i64 0), <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer)
2659
+ ;
2660
+ ret <vscale x 4 x float > splat (float 1 .0 )
2661
+ }
2662
+
2663
+ define <vscale x 4 x float > @scalable_splat_zero () {
2664
+ ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
2665
+ ; CHECK-LABEL: define noundef <vscale x 4 x float> @scalable_splat_zero
2666
+ ; CHECK-SAME: () #[[ATTR3]] {
2667
+ ; CHECK-NEXT: ret <vscale x 4 x float> zeroinitializer
2668
+ ;
2669
+ ret <vscale x 4 x float > zeroinitializer
2670
+ }
2671
+
2609
2672
declare i64 @_Z13get_global_idj (i32 noundef)
2610
2673
2611
2674
attributes #0 = { "denormal-fp-math" ="preserve-sign,preserve-sign" }
0 commit comments