diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/bitcast-vec-uniform.ll | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/bitcast-vec-uniform.ll b/test/Transforms/InstCombine/bitcast-vec-uniform.ll index a0d4678b0a..5975f1ec39 100644 --- a/test/Transforms/InstCombine/bitcast-vec-uniform.ll +++ b/test/Transforms/InstCombine/bitcast-vec-uniform.ll @@ -18,7 +18,8 @@ define <4 x i32> @b(<1 x i64> %y) { } ; CHECK: @foo -; CHECK: bitcast +; CHECK-NOT: bitcast +; CHECK: ret ; from MultiSource/Benchmarks/Bullet define <2 x float> @foo() { @@ -27,4 +28,43 @@ define <2 x float> @foo() { } +; CHECK: @foo2 +; CHECK-NOT: bitcast +; CHECK: ret +define <2 x double> @foo2() { + %cast = bitcast i128 -1 to <2 x double> + ret <2 x double> %cast +} +; CHECK: @foo3 +; CHECK-NOT: bitcast +; CHECK: ret +define <1 x float> @foo3() { + %cast = bitcast i32 -1 to <1 x float> + ret <1 x float> %cast +} + +; CHECK: @foo4 +; CHECK-NOT: bitcast +; CHECK: ret +define float @foo4() { + %cast = bitcast <1 x i32 ><i32 -1> to float + ret float %cast +} + +; CHECK: @foo5 +; CHECK-NOT: bitcast +; CHECK: ret +define double @foo5() { + %cast = bitcast <2 x i32 ><i32 -1, i32 -1> to double + ret double %cast +} + + +; CHECK: @foo6 +; CHECK-NOT: bitcast +; CHECK: ret +define <2 x double> @foo6() { + %cast = bitcast <4 x i32><i32 -1, i32 -1, i32 -1, i32 -1> to <2 x double> + ret <2 x double> %cast +} |