@@ -6059,8 +6059,7 @@ define i1 @icmp_samesign_logical_or(i32 %In) {
6059
6059
define i1 @float_to_int_comparing_constant1_positive1 (float %arg0 ) {
6060
6060
; CHECK-LABEL: define i1 @float_to_int_comparing_constant1_positive1(
6061
6061
; CHECK-SAME: float [[ARG0:%.*]]) {
6062
- ; CHECK-NEXT: [[V0:%.*]] = fptosi float [[ARG0]] to i32
6063
- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt i32 [[V0]], -1
6062
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ogt float [[ARG0]], -1.000000e+00
6064
6063
; CHECK-NEXT: ret i1 [[V1]]
6065
6064
;
6066
6065
%v0 = fptosi float %arg0 to i32
@@ -6072,8 +6071,7 @@ define i1 @float_to_int_comparing_constant1_positive1(float %arg0) {
6072
6071
define i1 @float_to_int_comparing_constant1_positive2 (float %arg0 ) {
6073
6072
; CHECK-LABEL: define i1 @float_to_int_comparing_constant1_positive2(
6074
6073
; CHECK-SAME: float [[ARG0:%.*]]) {
6075
- ; CHECK-NEXT: [[V0:%.*]] = fptosi float [[ARG0]] to i32
6076
- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt i32 [[V0]], 1
6074
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp oge float [[ARG0]], 2.000000e+00
6077
6075
; CHECK-NEXT: ret i1 [[V1]]
6078
6076
;
6079
6077
%v0 = fptosi float %arg0 to i32
@@ -6085,8 +6083,7 @@ define i1 @float_to_int_comparing_constant1_positive2(float %arg0) {
6085
6083
define i1 @float_to_int_comparing_constant2_positive1 (float %arg0 ) {
6086
6084
; CHECK-LABEL: define i1 @float_to_int_comparing_constant2_positive1(
6087
6085
; CHECK-SAME: float [[ARG0:%.*]]) {
6088
- ; CHECK-NEXT: [[V0:%.*]] = fptosi float [[ARG0]] to i32
6089
- ; CHECK-NEXT: [[V1:%.*]] = icmp slt i32 [[V0]], 1
6086
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp olt float [[ARG0]], 1.000000e+00
6090
6087
; CHECK-NEXT: ret i1 [[V1]]
6091
6088
;
6092
6089
%v0 = fptosi float %arg0 to i32
@@ -6098,8 +6095,7 @@ define i1 @float_to_int_comparing_constant2_positive1(float %arg0) {
6098
6095
define i1 @float_to_int_comparing_constant2_positive2 (float %arg0 ) {
6099
6096
; CHECK-LABEL: define i1 @float_to_int_comparing_constant2_positive2(
6100
6097
; CHECK-SAME: float [[ARG0:%.*]]) {
6101
- ; CHECK-NEXT: [[V0:%.*]] = fptosi float [[ARG0]] to i32
6102
- ; CHECK-NEXT: [[V1:%.*]] = icmp slt i32 [[V0]], 0
6098
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ole float [[ARG0]], -1.000000e+00
6103
6099
; CHECK-NEXT: ret i1 [[V1]]
6104
6100
;
6105
6101
%v0 = fptosi float %arg0 to i32
@@ -6110,8 +6106,7 @@ define i1 @float_to_int_comparing_constant2_positive2(float %arg0) {
6110
6106
define i1 @double_to_int_comparing_constant1_positive1 (double %arg0 ) {
6111
6107
; CHECK-LABEL: define i1 @double_to_int_comparing_constant1_positive1(
6112
6108
; CHECK-SAME: double [[ARG0:%.*]]) {
6113
- ; CHECK-NEXT: [[V0:%.*]] = fptosi double [[ARG0]] to i32
6114
- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt i32 [[V0]], -1
6109
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ogt double [[ARG0]], -1.000000e+00
6115
6110
; CHECK-NEXT: ret i1 [[V1]]
6116
6111
;
6117
6112
%v0 = fptosi double %arg0 to i32
@@ -6122,8 +6117,7 @@ define i1 @double_to_int_comparing_constant1_positive1(double %arg0) {
6122
6117
define i1 @double_to_int_comparing_constant1_positive2 (double %arg0 ) {
6123
6118
; CHECK-LABEL: define i1 @double_to_int_comparing_constant1_positive2(
6124
6119
; CHECK-SAME: double [[ARG0:%.*]]) {
6125
- ; CHECK-NEXT: [[V0:%.*]] = fptosi double [[ARG0]] to i32
6126
- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt i32 [[V0]], 1
6120
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp oge double [[ARG0]], 2.000000e+00
6127
6121
; CHECK-NEXT: ret i1 [[V1]]
6128
6122
;
6129
6123
%v0 = fptosi double %arg0 to i32
@@ -6134,9 +6128,8 @@ define i1 @double_to_int_comparing_constant1_positive2(double %arg0) {
6134
6128
define i1 @fp16_to_int_comparing_constant2_positive1 (half %arg0 ) {
6135
6129
; CHECK-LABEL: define i1 @fp16_to_int_comparing_constant2_positive1(
6136
6130
; CHECK-SAME: half [[ARG0:%.*]]) {
6137
- ; CHECK-NEXT: [[V1:%.*]] = fptosi half [[ARG0]] to i32
6138
- ; CHECK-NEXT: [[V2:%.*]] = icmp slt i32 [[V1]], 1
6139
- ; CHECK-NEXT: ret i1 [[V2]]
6131
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp olt half [[ARG0]], 0xH3C00
6132
+ ; CHECK-NEXT: ret i1 [[V1]]
6140
6133
;
6141
6134
%v0 = fptosi half %arg0 to i32
6142
6135
%v1 = icmp slt i32 %v0 , 1
@@ -6146,9 +6139,8 @@ define i1 @fp16_to_int_comparing_constant2_positive1(half %arg0) {
6146
6139
define i1 @fp16_to_int_comparing_constant2_positive2 (half %arg0 ) {
6147
6140
; CHECK-LABEL: define i1 @fp16_to_int_comparing_constant2_positive2(
6148
6141
; CHECK-SAME: half [[ARG0:%.*]]) {
6149
- ; CHECK-NEXT: [[V1:%.*]] = fptosi half [[ARG0]] to i32
6150
- ; CHECK-NEXT: [[V2:%.*]] = icmp slt i32 [[V1]], 0
6151
- ; CHECK-NEXT: ret i1 [[V2]]
6142
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ole half [[ARG0]], 0xHBC00
6143
+ ; CHECK-NEXT: ret i1 [[V1]]
6152
6144
;
6153
6145
%v0 = fptosi half %arg0 to i32
6154
6146
%v1 = icmp slt i32 %v0 , 0
@@ -6202,8 +6194,7 @@ define i1 @float_to_int_comparing_constant2_negative2(float %arg0) {
6202
6194
define <2 x i1 > @float_to_int_comparing_constant_vec_positive1 (<2 x float > %arg0 ) {
6203
6195
; CHECK-LABEL: define <2 x i1> @float_to_int_comparing_constant_vec_positive1(
6204
6196
; CHECK-SAME: <2 x float> [[ARG0:%.*]]) {
6205
- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x float> [[ARG0]] to <2 x i32>
6206
- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt <2 x i32> [[V0]], splat (i32 -1)
6197
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ogt <2 x float> [[ARG0]], splat (float -1.000000e+00)
6207
6198
; CHECK-NEXT: ret <2 x i1> [[V1]]
6208
6199
;
6209
6200
%v0 = fptosi <2 x float > %arg0 to <2 x i32 >
@@ -6214,8 +6205,7 @@ define <2 x i1> @float_to_int_comparing_constant_vec_positive1(<2 x float> %arg0
6214
6205
define <2 x i1 > @float_to_int_comparing_constant_vec_positive2 (<2 x float > %arg0 ) {
6215
6206
; CHECK-LABEL: define <2 x i1> @float_to_int_comparing_constant_vec_positive2(
6216
6207
; CHECK-SAME: <2 x float> [[ARG0:%.*]]) {
6217
- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x float> [[ARG0]] to <2 x i32>
6218
- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt <2 x i32> [[V0]], <i32 0, i32 1>
6208
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp oge <2 x float> [[ARG0]], <float 1.000000e+00, float 2.000000e+00>
6219
6209
; CHECK-NEXT: ret <2 x i1> [[V1]]
6220
6210
;
6221
6211
%v0 = fptosi <2 x float > %arg0 to <2 x i32 >
@@ -6227,8 +6217,7 @@ define <2 x i1> @float_to_int_comparing_constant_vec_positive2(<2 x float> %arg0
6227
6217
define <2 x i1 > @float_to_int_comparing_constant_vec_positive3 (<2 x float > %arg0 ) {
6228
6218
; CHECK-LABEL: define <2 x i1> @float_to_int_comparing_constant_vec_positive3(
6229
6219
; CHECK-SAME: <2 x float> [[ARG0:%.*]]) {
6230
- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x float> [[ARG0]] to <2 x i32>
6231
- ; CHECK-NEXT: [[V1:%.*]] = icmp slt <2 x i32> [[V0]], splat (i32 1)
6220
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp olt <2 x float> [[ARG0]], splat (float 1.000000e+00)
6232
6221
; CHECK-NEXT: ret <2 x i1> [[V1]]
6233
6222
;
6234
6223
%v0 = fptosi <2 x float > %arg0 to <2 x i32 >
@@ -6239,8 +6228,7 @@ define <2 x i1> @float_to_int_comparing_constant_vec_positive3(<2 x float> %arg0
6239
6228
define <2 x i1 > @float_to_int_comparing_constant_vec_positive4 (<2 x float > %arg0 ) {
6240
6229
; CHECK-LABEL: define <2 x i1> @float_to_int_comparing_constant_vec_positive4(
6241
6230
; CHECK-SAME: <2 x float> [[ARG0:%.*]]) {
6242
- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x float> [[ARG0]] to <2 x i32>
6243
- ; CHECK-NEXT: [[V1:%.*]] = icmp slt <2 x i32> [[V0]], <i32 -1, i32 0>
6231
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ole <2 x float> [[ARG0]], <float -2.000000e+00, float -1.000000e+00>
6244
6232
; CHECK-NEXT: ret <2 x i1> [[V1]]
6245
6233
;
6246
6234
%v0 = fptosi <2 x float > %arg0 to <2 x i32 >
@@ -6251,8 +6239,7 @@ define <2 x i1> @float_to_int_comparing_constant_vec_positive4(<2 x float> %arg0
6251
6239
define <2 x i1 > @half_to_int_comparing_constant_vec_positive1 (<2 x half > %arg0 ) {
6252
6240
; CHECK-LABEL: define <2 x i1> @half_to_int_comparing_constant_vec_positive1(
6253
6241
; CHECK-SAME: <2 x half> [[ARG0:%.*]]) {
6254
- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x half> [[ARG0]] to <2 x i32>
6255
- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt <2 x i32> [[V0]], splat (i32 -1)
6242
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ogt <2 x half> [[ARG0]], splat (half 0xHBC00)
6256
6243
; CHECK-NEXT: ret <2 x i1> [[V1]]
6257
6244
;
6258
6245
%v0 = fptosi <2 x half > %arg0 to <2 x i32 >
@@ -6263,8 +6250,7 @@ define <2 x i1> @half_to_int_comparing_constant_vec_positive1(<2 x half> %arg0)
6263
6250
define <2 x i1 > @half_to_int_comparing_constant_vec_positive2 (<2 x half > %arg0 ) {
6264
6251
; CHECK-LABEL: define <2 x i1> @half_to_int_comparing_constant_vec_positive2(
6265
6252
; CHECK-SAME: <2 x half> [[ARG0:%.*]]) {
6266
- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x half> [[ARG0]] to <2 x i32>
6267
- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt <2 x i32> [[V0]], <i32 0, i32 1>
6253
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp oge <2 x half> [[ARG0]], <half 0xH3C00, half 0xH4000>
6268
6254
; CHECK-NEXT: ret <2 x i1> [[V1]]
6269
6255
;
6270
6256
%v0 = fptosi <2 x half > %arg0 to <2 x i32 >
@@ -6275,8 +6261,7 @@ define <2 x i1> @half_to_int_comparing_constant_vec_positive2(<2 x half> %arg0)
6275
6261
define <2 x i1 > @double_to_int_comparing_constant_vec_positive3 (<2 x double > %arg0 ) {
6276
6262
; CHECK-LABEL: define <2 x i1> @double_to_int_comparing_constant_vec_positive3(
6277
6263
; CHECK-SAME: <2 x double> [[ARG0:%.*]]) {
6278
- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x double> [[ARG0]] to <2 x i32>
6279
- ; CHECK-NEXT: [[V1:%.*]] = icmp slt <2 x i32> [[V0]], splat (i32 1)
6264
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp olt <2 x double> [[ARG0]], splat (double 1.000000e+00)
6280
6265
; CHECK-NEXT: ret <2 x i1> [[V1]]
6281
6266
;
6282
6267
%v0 = fptosi <2 x double > %arg0 to <2 x i32 >
@@ -6287,8 +6272,7 @@ define <2 x i1> @double_to_int_comparing_constant_vec_positive3(<2 x double> %ar
6287
6272
define <2 x i1 > @double_to_int_comparing_constant_vec_positive4 (<2 x double > %arg0 ) {
6288
6273
; CHECK-LABEL: define <2 x i1> @double_to_int_comparing_constant_vec_positive4(
6289
6274
; CHECK-SAME: <2 x double> [[ARG0:%.*]]) {
6290
- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x double> [[ARG0]] to <2 x i32>
6291
- ; CHECK-NEXT: [[V1:%.*]] = icmp slt <2 x i32> [[V0]], <i32 -1, i32 0>
6275
+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ole <2 x double> [[ARG0]], <double -2.000000e+00, double -1.000000e+00>
6292
6276
; CHECK-NEXT: ret <2 x i1> [[V1]]
6293
6277
;
6294
6278
%v0 = fptosi <2 x double > %arg0 to <2 x i32 >
0 commit comments