@@ -12,32 +12,28 @@ attributes #0 = { willreturn memory(errnomem: write) }
1212
1313define double @nextafter_can_constant_fold_up_direction () {
1414; CHECK-LABEL: define double @nextafter_can_constant_fold_up_direction() {
15- ; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double noundef 1.000000e+00, double noundef 2.000000e+00)
16- ; CHECK-NEXT: ret double [[NEXT]]
15+ ; CHECK-NEXT: ret double 0x3FF0000000000001
1716;
1817 %next = call double @nextafter (double noundef 1 .0 , double noundef 2 .0 )
1918 ret double %next
2019}
2120define double @nextafter_can_constant_fold_down_direction () {
2221; CHECK-LABEL: define double @nextafter_can_constant_fold_down_direction() {
23- ; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double noundef 1.000000e+00, double noundef 0.000000e+00)
24- ; CHECK-NEXT: ret double [[NEXT]]
22+ ; CHECK-NEXT: ret double 0x3FEFFFFFFFFFFFFF
2523;
2624 %next = call double @nextafter (double noundef 1 .0 , double noundef 0 .0 )
2725 ret double %next
2826}
2927define double @nextafter_can_constant_fold_equal_args () {
3028; CHECK-LABEL: define double @nextafter_can_constant_fold_equal_args() {
31- ; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double noundef 1.000000e+00, double noundef 1.000000e+00)
32- ; CHECK-NEXT: ret double [[NEXT]]
29+ ; CHECK-NEXT: ret double 1.000000e+00
3330;
3431 %next = call double @nextafter (double noundef 1 .0 , double noundef 1 .0 )
3532 ret double %next
3633}
3734define double @nextafter_can_constant_fold_with_nan_arg () {
3835; CHECK-LABEL: define double @nextafter_can_constant_fold_with_nan_arg() {
39- ; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double 1.000000e+00, double 0x7FF8000000000000)
40- ; CHECK-NEXT: ret double [[NEXT]]
36+ ; CHECK-NEXT: ret double 0x7FF8000000000000
4137;
4238 %arg = load double , double * @dbl_nan
4339 %next = call double @nextafter (double 1 .0 , double %arg )
@@ -46,7 +42,7 @@ define double @nextafter_can_constant_fold_with_nan_arg() {
4642define double @nextafter_not_marked_dead_on_pos_overflow () {
4743; CHECK-LABEL: define double @nextafter_not_marked_dead_on_pos_overflow() {
4844; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double 0x7FEFFFFFFFFFFFFF, double 0x7FF0000000000000)
49- ; CHECK-NEXT: ret double [[NEXT]]
45+ ; CHECK-NEXT: ret double 0x7FF0000000000000
5046;
5147 %arg1 = load double , double * @dbl_pos_max
5248 %arg2 = load double , double * @dbl_pos_infinity
@@ -56,7 +52,7 @@ define double @nextafter_not_marked_dead_on_pos_overflow () {
5652define double @nextafter_not_marked_dead_on_neg_overflow () {
5753; CHECK-LABEL: define double @nextafter_not_marked_dead_on_neg_overflow() {
5854; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double 0xFFEFFFFFFFFFFFFF, double 0xFFF0000000000000)
59- ; CHECK-NEXT: ret double [[NEXT]]
55+ ; CHECK-NEXT: ret double 0xFFF0000000000000
6056;
6157 %arg1 = load double , double * @dbl_neg_max
6258 %arg2 = load double , double * @dbl_neg_infinity
@@ -66,7 +62,7 @@ define double @nextafter_not_marked_dead_on_neg_overflow() {
6662define double @nextafter_not_marked_dead_on_zero_from_above () {
6763; CHECK-LABEL: define double @nextafter_not_marked_dead_on_zero_from_above() {
6864; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double 4.940660e-324, double 0.000000e+00)
69- ; CHECK-NEXT: ret double [[NEXT]]
65+ ; CHECK-NEXT: ret double 0.000000e+00
7066;
7167 %arg = load double , double * @dbl_pos_min_subnormal
7268 %next = call double @nextafter (double %arg , double 0 .0 )
@@ -75,7 +71,7 @@ define double @nextafter_not_marked_dead_on_zero_from_above() {
7571define double @nextafter_not_marked_dead_on_zero_from_below () {
7672; CHECK-LABEL: define double @nextafter_not_marked_dead_on_zero_from_below() {
7773; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double -4.940660e-324, double 0.000000e+00)
78- ; CHECK-NEXT: ret double [[NEXT]]
74+ ; CHECK-NEXT: ret double -0.000000e+00
7975;
8076 %arg = load double , double * @dbl_neg_min_subnormal
8177 %next = call double @nextafter (double %arg , double 0 .0 )
@@ -84,7 +80,7 @@ define double @nextafter_not_marked_dead_on_zero_from_below() {
8480define double @nextafter_not_marked_dead_on_subnormal () {
8581; CHECK-LABEL: define double @nextafter_not_marked_dead_on_subnormal() {
8682; CHECK-NEXT: [[NEXT:%.*]] = call double @nextafter(double 4.940660e-324, double 0x7FF0000000000000)
87- ; CHECK-NEXT: ret double [[NEXT]]
83+ ; CHECK-NEXT: ret double 9.881310e-324
8884;
8985 %subnormal = load double , double * @dbl_pos_min_subnormal
9086 %infinity = load double , double * @dbl_pos_infinity
@@ -98,32 +94,28 @@ define double @nextafter_not_marked_dead_on_subnormal() {
9894
9995define float @nextafterf_can_constant_fold_up_direction () {
10096; CHECK-LABEL: define float @nextafterf_can_constant_fold_up_direction() {
101- ; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float noundef 1.000000e+00, float noundef 2.000000e+00)
102- ; CHECK-NEXT: ret float [[NEXT]]
97+ ; CHECK-NEXT: ret float 0x3FF0000020000000
10398;
10499 %next = call float @nextafterf (float noundef 1 .0 , float noundef 2 .0 )
105100 ret float %next
106101}
107102define float @nextafterf_can_constant_fold_down_direction () {
108103; CHECK-LABEL: define float @nextafterf_can_constant_fold_down_direction() {
109- ; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float noundef 1.000000e+00, float noundef 0.000000e+00)
110- ; CHECK-NEXT: ret float [[NEXT]]
104+ ; CHECK-NEXT: ret float 0x3FEFFFFFE0000000
111105;
112106 %next = call float @nextafterf (float noundef 1 .0 , float noundef 0 .0 )
113107 ret float %next
114108}
115109define float @nextafterf_can_constant_fold_equal_args () {
116110; CHECK-LABEL: define float @nextafterf_can_constant_fold_equal_args() {
117- ; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float noundef 1.000000e+00, float noundef 1.000000e+00)
118- ; CHECK-NEXT: ret float [[NEXT]]
111+ ; CHECK-NEXT: ret float 1.000000e+00
119112;
120113 %next = call float @nextafterf (float noundef 1 .0 , float noundef 1 .0 )
121114 ret float %next
122115}
123116define float @nextafterf_can_constant_fold_with_nan_arg () {
124117; CHECK-LABEL: define float @nextafterf_can_constant_fold_with_nan_arg() {
125- ; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float 1.000000e+00, float 0x7FF8000000000000)
126- ; CHECK-NEXT: ret float [[NEXT]]
118+ ; CHECK-NEXT: ret float 0x7FF8000000000000
127119;
128120 %arg = load float , float * @flt_nan
129121 %next = call float @nextafterf (float 1 .0 , float %arg )
@@ -132,7 +124,7 @@ define float @nextafterf_can_constant_fold_with_nan_arg() {
132124define float @nextafterf_not_marked_dead_on_pos_overflow () {
133125; CHECK-LABEL: define float @nextafterf_not_marked_dead_on_pos_overflow() {
134126; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float 0x47EFFFFFE0000000, float 0x7FF0000000000000)
135- ; CHECK-NEXT: ret float [[NEXT]]
127+ ; CHECK-NEXT: ret float 0x7FF0000000000000
136128;
137129 %arg1 = load float , float * @flt_pos_max
138130 %arg2 = load float , float * @flt_pos_infinity
@@ -142,7 +134,7 @@ define float @nextafterf_not_marked_dead_on_pos_overflow() {
142134define float @nextafterf_not_marked_dead_on_neg_overflow () {
143135; CHECK-LABEL: define float @nextafterf_not_marked_dead_on_neg_overflow() {
144136; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float 0xC7EFFFFFE0000000, float 0xFFF0000000000000)
145- ; CHECK-NEXT: ret float [[NEXT]]
137+ ; CHECK-NEXT: ret float 0xFFF0000000000000
146138;
147139 %arg1 = load float , float * @flt_neg_max
148140 %arg2 = load float , float * @flt_neg_infinity
@@ -152,7 +144,7 @@ define float @nextafterf_not_marked_dead_on_neg_overflow() {
152144define float @nextafterf_not_marked_dead_on_zero_from_above () {
153145; CHECK-LABEL: define float @nextafterf_not_marked_dead_on_zero_from_above() {
154146; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float 0x36A0000000000000, float 0.000000e+00)
155- ; CHECK-NEXT: ret float [[NEXT]]
147+ ; CHECK-NEXT: ret float 0.000000e+00
156148;
157149 %arg = load float , float * @flt_pos_min_subnormal
158150 %next = call float @nextafterf (float %arg , float 0 .0 )
@@ -161,7 +153,7 @@ define float @nextafterf_not_marked_dead_on_zero_from_above() {
161153define float @nextafterf_not_marked_dead_on_zero_from_below () {
162154; CHECK-LABEL: define float @nextafterf_not_marked_dead_on_zero_from_below() {
163155; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float 0xB6A0000000000000, float 0.000000e+00)
164- ; CHECK-NEXT: ret float [[NEXT]]
156+ ; CHECK-NEXT: ret float -0.000000e+00
165157;
166158 %arg = load float , float * @flt_neg_min_subnormal
167159 %next = call float @nextafterf (float %arg , float 0 .0 )
@@ -170,7 +162,7 @@ define float @nextafterf_not_marked_dead_on_zero_from_below() {
170162define float @nextafterf_not_marked_dead_on_subnormal () {
171163; CHECK-LABEL: define float @nextafterf_not_marked_dead_on_subnormal() {
172164; CHECK-NEXT: [[NEXT:%.*]] = call float @nextafterf(float 0x36A0000000000000, float 0x7FF0000000000000)
173- ; CHECK-NEXT: ret float [[NEXT]]
165+ ; CHECK-NEXT: ret float 0x36B0000000000000
174166;
175167 %subnormal = load float , float * @flt_pos_min_subnormal
176168 %infinity = load float , float * @flt_pos_infinity
0 commit comments