@@ -6059,8 +6059,7 @@ define i1 @icmp_samesign_logical_or(i32 %In) {
60596059define i1 @float_to_int_comparing_constant1_positive1 (float %arg0 ) {
60606060; CHECK-LABEL: define i1 @float_to_int_comparing_constant1_positive1(
60616061; 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
60646063; CHECK-NEXT: ret i1 [[V1]]
60656064;
60666065 %v0 = fptosi float %arg0 to i32
@@ -6072,8 +6071,7 @@ define i1 @float_to_int_comparing_constant1_positive1(float %arg0) {
60726071define i1 @float_to_int_comparing_constant1_positive2 (float %arg0 ) {
60736072; CHECK-LABEL: define i1 @float_to_int_comparing_constant1_positive2(
60746073; 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
60776075; CHECK-NEXT: ret i1 [[V1]]
60786076;
60796077 %v0 = fptosi float %arg0 to i32
@@ -6085,8 +6083,7 @@ define i1 @float_to_int_comparing_constant1_positive2(float %arg0) {
60856083define i1 @float_to_int_comparing_constant2_positive1 (float %arg0 ) {
60866084; CHECK-LABEL: define i1 @float_to_int_comparing_constant2_positive1(
60876085; 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
60906087; CHECK-NEXT: ret i1 [[V1]]
60916088;
60926089 %v0 = fptosi float %arg0 to i32
@@ -6098,8 +6095,7 @@ define i1 @float_to_int_comparing_constant2_positive1(float %arg0) {
60986095define i1 @float_to_int_comparing_constant2_positive2 (float %arg0 ) {
60996096; CHECK-LABEL: define i1 @float_to_int_comparing_constant2_positive2(
61006097; 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
61036099; CHECK-NEXT: ret i1 [[V1]]
61046100;
61056101 %v0 = fptosi float %arg0 to i32
@@ -6110,8 +6106,7 @@ define i1 @float_to_int_comparing_constant2_positive2(float %arg0) {
61106106define i1 @double_to_int_comparing_constant1_positive1 (double %arg0 ) {
61116107; CHECK-LABEL: define i1 @double_to_int_comparing_constant1_positive1(
61126108; 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
61156110; CHECK-NEXT: ret i1 [[V1]]
61166111;
61176112 %v0 = fptosi double %arg0 to i32
@@ -6122,8 +6117,7 @@ define i1 @double_to_int_comparing_constant1_positive1(double %arg0) {
61226117define i1 @double_to_int_comparing_constant1_positive2 (double %arg0 ) {
61236118; CHECK-LABEL: define i1 @double_to_int_comparing_constant1_positive2(
61246119; 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
61276121; CHECK-NEXT: ret i1 [[V1]]
61286122;
61296123 %v0 = fptosi double %arg0 to i32
@@ -6134,8 +6128,7 @@ define i1 @double_to_int_comparing_constant1_positive2(double %arg0) {
61346128define i1 @fp16_to_int_comparing_constant2_positive1 (half %arg0 ) {
61356129; CHECK-LABEL: define i1 @fp16_to_int_comparing_constant2_positive1(
61366130; CHECK-SAME: half [[ARG0:%.*]]) {
6137- ; CHECK-NEXT: [[V0:%.*]] = fptosi half [[ARG0]] to i32
6138- ; CHECK-NEXT: [[V1:%.*]] = icmp slt i32 [[V0]], 1
6131+ ; CHECK-NEXT: [[V1:%.*]] = fcmp olt half [[ARG0]], 0xH3C00
61396132; CHECK-NEXT: ret i1 [[V1]]
61406133;
61416134 %v0 = fptosi half %arg0 to i32
@@ -6146,8 +6139,7 @@ define i1 @fp16_to_int_comparing_constant2_positive1(half %arg0) {
61466139define i1 @fp16_to_int_comparing_constant2_positive2 (half %arg0 ) {
61476140; CHECK-LABEL: define i1 @fp16_to_int_comparing_constant2_positive2(
61486141; CHECK-SAME: half [[ARG0:%.*]]) {
6149- ; CHECK-NEXT: [[V0:%.*]] = fptosi half [[ARG0]] to i32
6150- ; CHECK-NEXT: [[V1:%.*]] = icmp slt i32 [[V0]], 0
6142+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ole half [[ARG0]], 0xHBC00
61516143; CHECK-NEXT: ret i1 [[V1]]
61526144;
61536145 %v0 = fptosi half %arg0 to i32
@@ -6222,8 +6214,7 @@ define i1 @float_to_int_comparing_constant2_negative2(float %arg0) {
62226214define <2 x i1 > @float_to_int_comparing_constant_vec_positive1 (<2 x float > %arg0 ) {
62236215; CHECK-LABEL: define <2 x i1> @float_to_int_comparing_constant_vec_positive1(
62246216; CHECK-SAME: <2 x float> [[ARG0:%.*]]) {
6225- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x float> [[ARG0]] to <2 x i32>
6226- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt <2 x i32> [[V0]], splat (i32 -1)
6217+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ogt <2 x float> [[ARG0]], splat (float -1.000000e+00)
62276218; CHECK-NEXT: ret <2 x i1> [[V1]]
62286219;
62296220 %v0 = fptosi <2 x float > %arg0 to <2 x i32 >
@@ -6234,8 +6225,7 @@ define <2 x i1> @float_to_int_comparing_constant_vec_positive1(<2 x float> %arg0
62346225define <2 x i1 > @float_to_int_comparing_constant_vec_positive2 (<2 x float > %arg0 ) {
62356226; CHECK-LABEL: define <2 x i1> @float_to_int_comparing_constant_vec_positive2(
62366227; CHECK-SAME: <2 x float> [[ARG0:%.*]]) {
6237- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x float> [[ARG0]] to <2 x i32>
6238- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt <2 x i32> [[V0]], <i32 0, i32 1>
6228+ ; CHECK-NEXT: [[V1:%.*]] = fcmp oge <2 x float> [[ARG0]], <float 1.000000e+00, float 2.000000e+00>
62396229; CHECK-NEXT: ret <2 x i1> [[V1]]
62406230;
62416231 %v0 = fptosi <2 x float > %arg0 to <2 x i32 >
@@ -6247,8 +6237,7 @@ define <2 x i1> @float_to_int_comparing_constant_vec_positive2(<2 x float> %arg0
62476237define <2 x i1 > @float_to_int_comparing_constant_vec_positive3 (<2 x float > %arg0 ) {
62486238; CHECK-LABEL: define <2 x i1> @float_to_int_comparing_constant_vec_positive3(
62496239; CHECK-SAME: <2 x float> [[ARG0:%.*]]) {
6250- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x float> [[ARG0]] to <2 x i32>
6251- ; CHECK-NEXT: [[V1:%.*]] = icmp slt <2 x i32> [[V0]], splat (i32 1)
6240+ ; CHECK-NEXT: [[V1:%.*]] = fcmp olt <2 x float> [[ARG0]], splat (float 1.000000e+00)
62526241; CHECK-NEXT: ret <2 x i1> [[V1]]
62536242;
62546243 %v0 = fptosi <2 x float > %arg0 to <2 x i32 >
@@ -6259,8 +6248,7 @@ define <2 x i1> @float_to_int_comparing_constant_vec_positive3(<2 x float> %arg0
62596248define <2 x i1 > @float_to_int_comparing_constant_vec_positive4 (<2 x float > %arg0 ) {
62606249; CHECK-LABEL: define <2 x i1> @float_to_int_comparing_constant_vec_positive4(
62616250; CHECK-SAME: <2 x float> [[ARG0:%.*]]) {
6262- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x float> [[ARG0]] to <2 x i32>
6263- ; CHECK-NEXT: [[V1:%.*]] = icmp slt <2 x i32> [[V0]], <i32 -1, i32 0>
6251+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ole <2 x float> [[ARG0]], <float -2.000000e+00, float -1.000000e+00>
62646252; CHECK-NEXT: ret <2 x i1> [[V1]]
62656253;
62666254 %v0 = fptosi <2 x float > %arg0 to <2 x i32 >
@@ -6271,8 +6259,7 @@ define <2 x i1> @float_to_int_comparing_constant_vec_positive4(<2 x float> %arg0
62716259define <2 x i1 > @half_to_int_comparing_constant_vec_positive1 (<2 x half > %arg0 ) {
62726260; CHECK-LABEL: define <2 x i1> @half_to_int_comparing_constant_vec_positive1(
62736261; CHECK-SAME: <2 x half> [[ARG0:%.*]]) {
6274- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x half> [[ARG0]] to <2 x i32>
6275- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt <2 x i32> [[V0]], splat (i32 -1)
6262+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ogt <2 x half> [[ARG0]], splat (half 0xHBC00)
62766263; CHECK-NEXT: ret <2 x i1> [[V1]]
62776264;
62786265 %v0 = fptosi <2 x half > %arg0 to <2 x i32 >
@@ -6283,8 +6270,7 @@ define <2 x i1> @half_to_int_comparing_constant_vec_positive1(<2 x half> %arg0)
62836270define <2 x i1 > @half_to_int_comparing_constant_vec_positive2 (<2 x half > %arg0 ) {
62846271; CHECK-LABEL: define <2 x i1> @half_to_int_comparing_constant_vec_positive2(
62856272; CHECK-SAME: <2 x half> [[ARG0:%.*]]) {
6286- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x half> [[ARG0]] to <2 x i32>
6287- ; CHECK-NEXT: [[V1:%.*]] = icmp sgt <2 x i32> [[V0]], <i32 0, i32 1>
6273+ ; CHECK-NEXT: [[V1:%.*]] = fcmp oge <2 x half> [[ARG0]], <half 0xH3C00, half 0xH4000>
62886274; CHECK-NEXT: ret <2 x i1> [[V1]]
62896275;
62906276 %v0 = fptosi <2 x half > %arg0 to <2 x i32 >
@@ -6295,8 +6281,7 @@ define <2 x i1> @half_to_int_comparing_constant_vec_positive2(<2 x half> %arg0)
62956281define <2 x i1 > @double_to_int_comparing_constant_vec_positive3 (<2 x double > %arg0 ) {
62966282; CHECK-LABEL: define <2 x i1> @double_to_int_comparing_constant_vec_positive3(
62976283; CHECK-SAME: <2 x double> [[ARG0:%.*]]) {
6298- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x double> [[ARG0]] to <2 x i32>
6299- ; CHECK-NEXT: [[V1:%.*]] = icmp slt <2 x i32> [[V0]], splat (i32 1)
6284+ ; CHECK-NEXT: [[V1:%.*]] = fcmp olt <2 x double> [[ARG0]], splat (double 1.000000e+00)
63006285; CHECK-NEXT: ret <2 x i1> [[V1]]
63016286;
63026287 %v0 = fptosi <2 x double > %arg0 to <2 x i32 >
@@ -6307,8 +6292,7 @@ define <2 x i1> @double_to_int_comparing_constant_vec_positive3(<2 x double> %ar
63076292define <2 x i1 > @double_to_int_comparing_constant_vec_positive4 (<2 x double > %arg0 ) {
63086293; CHECK-LABEL: define <2 x i1> @double_to_int_comparing_constant_vec_positive4(
63096294; CHECK-SAME: <2 x double> [[ARG0:%.*]]) {
6310- ; CHECK-NEXT: [[V0:%.*]] = fptosi <2 x double> [[ARG0]] to <2 x i32>
6311- ; CHECK-NEXT: [[V1:%.*]] = icmp slt <2 x i32> [[V0]], <i32 -1, i32 0>
6295+ ; CHECK-NEXT: [[V1:%.*]] = fcmp ole <2 x double> [[ARG0]], <double -2.000000e+00, double -1.000000e+00>
63126296; CHECK-NEXT: ret <2 x i1> [[V1]]
63136297;
63146298 %v0 = fptosi <2 x double > %arg0 to <2 x i32 >
0 commit comments