diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-03-25 14:19:25 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-03-25 14:19:25 +0000 |
commit | 60d0e119c7ca44ed0fdf0ddde7e69c03e70c54b2 (patch) | |
tree | 9a56fbfa51c3d7ecd294c5c1170f9f1c1f4f34e5 | |
parent | 841aac04d4130688fba1b372531445fedf4e1f34 (diff) | |
download | bcm5719-llvm-60d0e119c7ca44ed0fdf0ddde7e69c03e70c54b2.tar.gz bcm5719-llvm-60d0e119c7ca44ed0fdf0ddde7e69c03e70c54b2.zip |
[InstCombine] consolidate casted icmp vector tests
We have thorough coverage of predicates and scalar types,
so we just need a sampling of vector tests to show that
things are working or not with vectors types.
llvm-svn: 328449
-rw-r--r-- | llvm/test/Transforms/InstCombine/cast-int-icmp-eq-0.ll | 703 |
1 files changed, 43 insertions, 660 deletions
diff --git a/llvm/test/Transforms/InstCombine/cast-int-icmp-eq-0.ll b/llvm/test/Transforms/InstCombine/cast-int-icmp-eq-0.ll index fe5c5c51a20..41035857f91 100644 --- a/llvm/test/Transforms/InstCombine/cast-int-icmp-eq-0.ll +++ b/llvm/test/Transforms/InstCombine/cast-int-icmp-eq-0.ll @@ -25,19 +25,6 @@ define i1 @i32_cast_cmp_eq_int_0_sitofp_float(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_eq_int_0_sitofp_float_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_eq_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp eq <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_ne_int_0_sitofp_float(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_ne_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0 @@ -49,19 +36,6 @@ define i1 @i32_cast_cmp_ne_int_0_sitofp_float(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_ne_int_0_sitofp_float_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_ne_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp ne <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_slt_int_0_sitofp_float(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_slt_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 0 @@ -73,19 +47,6 @@ define i1 @i32_cast_cmp_slt_int_0_sitofp_float(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_slt_int_0_sitofp_float_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_slt_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp slt <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_sgt_int_0_sitofp_float(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_sgt_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], 0 @@ -97,19 +58,6 @@ define i1 @i32_cast_cmp_sgt_int_0_sitofp_float(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_sgt_int_0_sitofp_float_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_sgt_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp sgt <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_slt_int_1_sitofp_float(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_slt_int_1_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 1 @@ -121,17 +69,6 @@ define i1 @i32_cast_cmp_slt_int_1_sitofp_float(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_slt_int_1_sitofp_float_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_slt_int_1_sitofp_float_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i32> [[I:%.*]], <i32 1, i32 1, i32 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp slt <3 x i32> %b, <i32 1, i32 undef, i32 1> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_sgt_int_m1_sitofp_float(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_sgt_int_m1_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], -1 @@ -143,17 +80,6 @@ define i1 @i32_cast_cmp_sgt_int_m1_sitofp_float(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_sgt_int_m1_sitofp_float_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_sgt_int_m1_sitofp_float_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i32> [[I:%.*]], <i32 -1, i32 -1, i32 -1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp sgt <3 x i32> %b, <i32 -1, i32 undef, i32 -1> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_eq_int_0_sitofp_double(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_eq_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0 @@ -165,19 +91,6 @@ define i1 @i32_cast_cmp_eq_int_0_sitofp_double(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_eq_int_0_sitofp_double_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_eq_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp eq <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_ne_int_0_sitofp_double(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_ne_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0 @@ -189,19 +102,6 @@ define i1 @i32_cast_cmp_ne_int_0_sitofp_double(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_ne_int_0_sitofp_double_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_ne_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp ne <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_slt_int_0_sitofp_double(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_slt_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 0 @@ -213,19 +113,6 @@ define i1 @i32_cast_cmp_slt_int_0_sitofp_double(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_slt_int_0_sitofp_double_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_slt_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp slt <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_sgt_int_0_sitofp_double(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_sgt_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], 0 @@ -237,19 +124,6 @@ define i1 @i32_cast_cmp_sgt_int_0_sitofp_double(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_sgt_int_0_sitofp_double_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_sgt_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp sgt <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_slt_int_1_sitofp_double(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_slt_int_1_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 1 @@ -261,17 +135,6 @@ define i1 @i32_cast_cmp_slt_int_1_sitofp_double(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_slt_int_1_sitofp_double_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_slt_int_1_sitofp_double_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i32> [[I:%.*]], <i32 1, i32 1, i32 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp slt <3 x i64> %b, <i64 1, i64 undef, i64 1> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_sgt_int_m1_sitofp_double(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_sgt_int_m1_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], -1 @@ -283,17 +146,6 @@ define i1 @i32_cast_cmp_sgt_int_m1_sitofp_double(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_sgt_int_m1_sitofp_double_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_sgt_int_m1_sitofp_double_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i32> [[I:%.*]], <i32 -1, i32 -1, i32 -1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp sgt <3 x i64> %b, <i64 -1, i64 undef, i64 -1> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_eq_int_0_sitofp_half(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_eq_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0 @@ -305,19 +157,6 @@ define i1 @i32_cast_cmp_eq_int_0_sitofp_half(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_eq_int_0_sitofp_half_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_eq_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp eq <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_ne_int_0_sitofp_half(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_ne_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0 @@ -329,19 +168,6 @@ define i1 @i32_cast_cmp_ne_int_0_sitofp_half(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_ne_int_0_sitofp_half_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_ne_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp ne <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_slt_int_0_sitofp_half(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_slt_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 0 @@ -353,19 +179,6 @@ define i1 @i32_cast_cmp_slt_int_0_sitofp_half(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_slt_int_0_sitofp_half_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_slt_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp slt <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_sgt_int_0_sitofp_half(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_sgt_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], 0 @@ -377,19 +190,6 @@ define i1 @i32_cast_cmp_sgt_int_0_sitofp_half(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_sgt_int_0_sitofp_half_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_sgt_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp sgt <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_slt_int_1_sitofp_half(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_slt_int_1_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 1 @@ -401,17 +201,6 @@ define i1 @i32_cast_cmp_slt_int_1_sitofp_half(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_slt_int_1_sitofp_half_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_slt_int_1_sitofp_half_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i32> [[I:%.*]], <i32 1, i32 1, i32 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp slt <3 x i16> %b, <i16 1, i16 undef, i16 1> - ret <3 x i1> %cmp -} - define i1 @i32_cast_cmp_sgt_int_m1_sitofp_half(i32 %i) { ; CHECK-LABEL: @i32_cast_cmp_sgt_int_m1_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], -1 @@ -423,17 +212,6 @@ define i1 @i32_cast_cmp_sgt_int_m1_sitofp_half(i32 %i) { ret i1 %cmp } -define <3 x i1> @i32_cast_cmp_sgt_int_m1_sitofp_half_vec(<3 x i32> %i) { -; CHECK-LABEL: @i32_cast_cmp_sgt_int_m1_sitofp_half_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i32> [[I:%.*]], <i32 -1, i32 -1, i32 -1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i32> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp sgt <3 x i16> %b, <i16 -1, i16 undef, i16 -1> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_eq_int_0_sitofp_float(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_eq_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0 @@ -445,19 +223,6 @@ define i1 @i64_cast_cmp_eq_int_0_sitofp_float(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_eq_int_0_sitofp_float_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_eq_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp eq <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_ne_int_0_sitofp_float(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_ne_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[I:%.*]], 0 @@ -469,19 +234,6 @@ define i1 @i64_cast_cmp_ne_int_0_sitofp_float(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_ne_int_0_sitofp_float_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_ne_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp ne <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_slt_int_0_sitofp_float(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_slt_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[I:%.*]], 0 @@ -493,19 +245,6 @@ define i1 @i64_cast_cmp_slt_int_0_sitofp_float(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_slt_int_0_sitofp_float_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_slt_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp slt <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_sgt_int_0_sitofp_float(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_sgt_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[I:%.*]], 0 @@ -517,19 +256,6 @@ define i1 @i64_cast_cmp_sgt_int_0_sitofp_float(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_sgt_int_0_sitofp_float_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_sgt_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp sgt <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_slt_int_1_sitofp_float(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_slt_int_1_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[I:%.*]], 1 @@ -541,17 +267,6 @@ define i1 @i64_cast_cmp_slt_int_1_sitofp_float(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_slt_int_1_sitofp_float_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_slt_int_1_sitofp_float_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i64> [[I:%.*]], <i64 1, i64 1, i64 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp slt <3 x i32> %b, <i32 1, i32 undef, i32 1> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_sgt_int_m1_sitofp_float(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_sgt_int_m1_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[I:%.*]], -1 @@ -563,17 +278,6 @@ define i1 @i64_cast_cmp_sgt_int_m1_sitofp_float(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_sgt_int_m1_sitofp_float_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_sgt_int_m1_sitofp_float_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i64> [[I:%.*]], <i64 -1, i64 -1, i64 -1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp sgt <3 x i32> %b, <i32 -1, i32 undef, i32 -1> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_eq_int_0_sitofp_double(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_eq_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0 @@ -585,19 +289,6 @@ define i1 @i64_cast_cmp_eq_int_0_sitofp_double(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_eq_int_0_sitofp_double_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_eq_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp eq <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_ne_int_0_sitofp_double(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_ne_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[I:%.*]], 0 @@ -609,19 +300,6 @@ define i1 @i64_cast_cmp_ne_int_0_sitofp_double(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_ne_int_0_sitofp_double_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_ne_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp ne <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_slt_int_0_sitofp_double(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_slt_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[I:%.*]], 0 @@ -633,19 +311,6 @@ define i1 @i64_cast_cmp_slt_int_0_sitofp_double(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_slt_int_0_sitofp_double_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_slt_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp slt <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_sgt_int_0_sitofp_double(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_sgt_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[I:%.*]], 0 @@ -657,19 +322,6 @@ define i1 @i64_cast_cmp_sgt_int_0_sitofp_double(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_sgt_int_0_sitofp_double_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_sgt_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp sgt <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_slt_int_1_sitofp_double(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_slt_int_1_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[I:%.*]], 1 @@ -681,17 +333,6 @@ define i1 @i64_cast_cmp_slt_int_1_sitofp_double(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_slt_int_1_sitofp_double_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_slt_int_1_sitofp_double_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i64> [[I:%.*]], <i64 1, i64 1, i64 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp slt <3 x i64> %b, <i64 1, i64 undef, i64 1> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_sgt_int_m1_sitofp_double(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_sgt_int_m1_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[I:%.*]], -1 @@ -703,17 +344,6 @@ define i1 @i64_cast_cmp_sgt_int_m1_sitofp_double(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_sgt_int_m1_sitofp_double_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_sgt_int_m1_sitofp_double_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i64> [[I:%.*]], <i64 -1, i64 -1, i64 -1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp sgt <3 x i64> %b, <i64 -1, i64 undef, i64 -1> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_eq_int_0_sitofp_half(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_eq_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0 @@ -725,19 +355,6 @@ define i1 @i64_cast_cmp_eq_int_0_sitofp_half(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_eq_int_0_sitofp_half_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_eq_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp eq <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_ne_int_0_sitofp_half(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_ne_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[I:%.*]], 0 @@ -749,19 +366,6 @@ define i1 @i64_cast_cmp_ne_int_0_sitofp_half(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_ne_int_0_sitofp_half_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_ne_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp ne <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_slt_int_0_sitofp_half(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_slt_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[I:%.*]], 0 @@ -773,19 +377,6 @@ define i1 @i64_cast_cmp_slt_int_0_sitofp_half(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_slt_int_0_sitofp_half_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_slt_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp slt <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_sgt_int_0_sitofp_half(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_sgt_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[I:%.*]], 0 @@ -797,19 +388,6 @@ define i1 @i64_cast_cmp_sgt_int_0_sitofp_half(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_sgt_int_0_sitofp_half_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_sgt_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i64> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp sgt <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_slt_int_1_sitofp_half(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_slt_int_1_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[I:%.*]], 1 @@ -821,17 +399,6 @@ define i1 @i64_cast_cmp_slt_int_1_sitofp_half(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_slt_int_1_sitofp_half_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_slt_int_1_sitofp_half_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i64> [[I:%.*]], <i64 1, i64 1, i64 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp slt <3 x i16> %b, <i16 1, i16 undef, i16 1> - ret <3 x i1> %cmp -} - define i1 @i64_cast_cmp_sgt_int_m1_sitofp_half(i64 %i) { ; CHECK-LABEL: @i64_cast_cmp_sgt_int_m1_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[I:%.*]], -1 @@ -843,17 +410,6 @@ define i1 @i64_cast_cmp_sgt_int_m1_sitofp_half(i64 %i) { ret i1 %cmp } -define <3 x i1> @i64_cast_cmp_sgt_int_m1_sitofp_half_vec(<3 x i64> %i) { -; CHECK-LABEL: @i64_cast_cmp_sgt_int_m1_sitofp_half_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i64> [[I:%.*]], <i64 -1, i64 -1, i64 -1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i64> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp sgt <3 x i16> %b, <i16 -1, i16 undef, i16 -1> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_eq_int_0_sitofp_float(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_eq_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i16 [[I:%.*]], 0 @@ -865,19 +421,6 @@ define i1 @i16_cast_cmp_eq_int_0_sitofp_float(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_eq_int_0_sitofp_float_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_eq_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp eq <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_ne_int_0_sitofp_float(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_ne_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i16 [[I:%.*]], 0 @@ -889,19 +432,6 @@ define i1 @i16_cast_cmp_ne_int_0_sitofp_float(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_ne_int_0_sitofp_float_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_ne_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp ne <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_slt_int_0_sitofp_float(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_slt_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i16 [[I:%.*]], 0 @@ -913,19 +443,6 @@ define i1 @i16_cast_cmp_slt_int_0_sitofp_float(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_slt_int_0_sitofp_float_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_slt_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp slt <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_sgt_int_0_sitofp_float(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_sgt_int_0_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i16 [[I:%.*]], 0 @@ -937,19 +454,6 @@ define i1 @i16_cast_cmp_sgt_int_0_sitofp_float(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_sgt_int_0_sitofp_float_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_sgt_int_0_sitofp_float_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x float> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i32> [[B]], <i32 0, i32 undef, i32 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp sgt <3 x i32> %b, <i32 0, i32 undef, i32 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_slt_int_1_sitofp_float(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_slt_int_1_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i16 [[I:%.*]], 1 @@ -961,17 +465,6 @@ define i1 @i16_cast_cmp_slt_int_1_sitofp_float(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_slt_int_1_sitofp_float_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_slt_int_1_sitofp_float_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i16> [[I:%.*]], <i16 1, i16 1, i16 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp slt <3 x i32> %b, <i32 1, i32 undef, i32 1> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_sgt_int_m1_sitofp_float(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_sgt_int_m1_sitofp_float( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i16 [[I:%.*]], -1 @@ -983,17 +476,6 @@ define i1 @i16_cast_cmp_sgt_int_m1_sitofp_float(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_sgt_int_m1_sitofp_float_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_sgt_int_m1_sitofp_float_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i16> [[I:%.*]], <i16 -1, i16 -1, i16 -1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x float> - %b = bitcast <3 x float> %f to <3 x i32> - %cmp = icmp sgt <3 x i32> %b, <i32 -1, i32 undef, i32 -1> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_eq_int_0_sitofp_double(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_eq_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i16 [[I:%.*]], 0 @@ -1005,19 +487,6 @@ define i1 @i16_cast_cmp_eq_int_0_sitofp_double(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_eq_int_0_sitofp_double_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_eq_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp eq <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_ne_int_0_sitofp_double(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_ne_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i16 [[I:%.*]], 0 @@ -1029,19 +498,6 @@ define i1 @i16_cast_cmp_ne_int_0_sitofp_double(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_ne_int_0_sitofp_double_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_ne_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp ne <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_slt_int_0_sitofp_double(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_slt_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i16 [[I:%.*]], 0 @@ -1053,19 +509,6 @@ define i1 @i16_cast_cmp_slt_int_0_sitofp_double(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_slt_int_0_sitofp_double_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_slt_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp slt <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_sgt_int_0_sitofp_double(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_sgt_int_0_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i16 [[I:%.*]], 0 @@ -1077,19 +520,6 @@ define i1 @i16_cast_cmp_sgt_int_0_sitofp_double(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_sgt_int_0_sitofp_double_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_sgt_int_0_sitofp_double_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x double> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x double> [[F]] to <3 x i64> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i64> [[B]], <i64 0, i64 undef, i64 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp sgt <3 x i64> %b, <i64 0, i64 undef, i64 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_slt_int_1_sitofp_double(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_slt_int_1_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i16 [[I:%.*]], 1 @@ -1101,17 +531,6 @@ define i1 @i16_cast_cmp_slt_int_1_sitofp_double(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_slt_int_1_sitofp_double_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_slt_int_1_sitofp_double_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i16> [[I:%.*]], <i16 1, i16 1, i16 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp slt <3 x i64> %b, <i64 1, i64 undef, i64 1> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_sgt_int_m1_sitofp_double(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_sgt_int_m1_sitofp_double( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i16 [[I:%.*]], -1 @@ -1123,17 +542,6 @@ define i1 @i16_cast_cmp_sgt_int_m1_sitofp_double(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_sgt_int_m1_sitofp_double_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_sgt_int_m1_sitofp_double_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i16> [[I:%.*]], <i16 -1, i16 -1, i16 -1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x double> - %b = bitcast <3 x double> %f to <3 x i64> - %cmp = icmp sgt <3 x i64> %b, <i64 -1, i64 undef, i64 -1> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_eq_int_0_sitofp_half(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_eq_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i16 [[I:%.*]], 0 @@ -1145,19 +553,6 @@ define i1 @i16_cast_cmp_eq_int_0_sitofp_half(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_eq_int_0_sitofp_half_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_eq_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp eq <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_ne_int_0_sitofp_half(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_ne_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i16 [[I:%.*]], 0 @@ -1169,19 +564,6 @@ define i1 @i16_cast_cmp_ne_int_0_sitofp_half(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_ne_int_0_sitofp_half_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_ne_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp ne <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_slt_int_0_sitofp_half(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_slt_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i16 [[I:%.*]], 0 @@ -1193,19 +575,6 @@ define i1 @i16_cast_cmp_slt_int_0_sitofp_half(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_slt_int_0_sitofp_half_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_slt_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp slt <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_sgt_int_0_sitofp_half(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_sgt_int_0_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i16 [[I:%.*]], 0 @@ -1217,19 +586,6 @@ define i1 @i16_cast_cmp_sgt_int_0_sitofp_half(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_sgt_int_0_sitofp_half_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_sgt_int_0_sitofp_half_vec( -; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i16> [[I:%.*]] to <3 x half> -; CHECK-NEXT: [[B:%.*]] = bitcast <3 x half> [[F]] to <3 x i16> -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i16> [[B]], <i16 0, i16 undef, i16 0> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp sgt <3 x i16> %b, <i16 0, i16 undef, i16 0> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_slt_int_1_sitofp_half(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_slt_int_1_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i16 [[I:%.*]], 1 @@ -1241,17 +597,6 @@ define i1 @i16_cast_cmp_slt_int_1_sitofp_half(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_slt_int_1_sitofp_half_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_slt_int_1_sitofp_half_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i16> [[I:%.*]], <i16 1, i16 1, i16 1> -; CHECK-NEXT: ret <3 x i1> [[CMP]] -; - %f = sitofp <3 x i16> %i to <3 x half> - %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp slt <3 x i16> %b, <i16 1, i16 undef, i16 1> - ret <3 x i1> %cmp -} - define i1 @i16_cast_cmp_sgt_int_m1_sitofp_half(i16 %i) { ; CHECK-LABEL: @i16_cast_cmp_sgt_int_m1_sitofp_half( ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i16 [[I:%.*]], -1 @@ -1263,13 +608,51 @@ define i1 @i16_cast_cmp_sgt_int_m1_sitofp_half(i16 %i) { ret i1 %cmp } -define <3 x i1> @i16_cast_cmp_sgt_int_m1_sitofp_half_vec(<3 x i16> %i) { -; CHECK-LABEL: @i16_cast_cmp_sgt_int_m1_sitofp_half_vec( -; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i16> [[I:%.*]], <i16 -1, i16 -1, i16 -1> +; Verify that vector types and vector constants including undef elements are transformed too. + +define <3 x i1> @i32_cast_cmp_ne_int_0_sitofp_double_vec(<3 x i32> %i) { +; CHECK-LABEL: @i32_cast_cmp_ne_int_0_sitofp_double_vec( +; CHECK-NEXT: [[CMP:%.*]] = icmp ne <3 x i32> [[I:%.*]], zeroinitializer ; CHECK-NEXT: ret <3 x i1> [[CMP]] ; - %f = sitofp <3 x i16> %i to <3 x half> + %f = sitofp <3 x i32> %i to <3 x double> + %b = bitcast <3 x double> %f to <3 x i64> + %cmp = icmp ne <3 x i64> %b, <i64 0, i64 0, i64 0> + ret <3 x i1> %cmp +} + +define <3 x i1> @i32_cast_cmp_eq_int_0_sitofp_float_vec_undef(<3 x i32> %i) { +; CHECK-LABEL: @i32_cast_cmp_eq_int_0_sitofp_float_vec_undef( +; CHECK-NEXT: [[F:%.*]] = sitofp <3 x i32> [[I:%.*]] to <3 x float> +; CHECK-NEXT: [[B:%.*]] = bitcast <3 x float> [[F]] to <3 x i32> +; CHECK-NEXT: [[CMP:%.*]] = icmp eq <3 x i32> [[B]], <i32 0, i32 undef, i32 0> +; CHECK-NEXT: ret <3 x i1> [[CMP]] +; + %f = sitofp <3 x i32> %i to <3 x float> + %b = bitcast <3 x float> %f to <3 x i32> + %cmp = icmp eq <3 x i32> %b, <i32 0, i32 undef, i32 0> + ret <3 x i1> %cmp +} + +define <3 x i1> @i64_cast_cmp_slt_int_1_sitofp_half_vec_undef(<3 x i64> %i) { +; CHECK-LABEL: @i64_cast_cmp_slt_int_1_sitofp_half_vec_undef( +; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i64> [[I:%.*]], <i64 1, i64 1, i64 1> +; CHECK-NEXT: ret <3 x i1> [[CMP]] +; + %f = sitofp <3 x i64> %i to <3 x half> %b = bitcast <3 x half> %f to <3 x i16> - %cmp = icmp sgt <3 x i16> %b, <i16 -1, i16 undef, i16 -1> + %cmp = icmp slt <3 x i16> %b, <i16 1, i16 undef, i16 1> + ret <3 x i1> %cmp +} + +define <3 x i1> @i16_cast_cmp_sgt_int_m1_sitofp_float_vec_undef(<3 x i16> %i) { +; CHECK-LABEL: @i16_cast_cmp_sgt_int_m1_sitofp_float_vec_undef( +; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i16> [[I:%.*]], <i16 -1, i16 -1, i16 -1> +; CHECK-NEXT: ret <3 x i1> [[CMP]] +; + %f = sitofp <3 x i16> %i to <3 x float> + %b = bitcast <3 x float> %f to <3 x i32> + %cmp = icmp sgt <3 x i32> %b, <i32 -1, i32 undef, i32 -1> ret <3 x i1> %cmp } + |