aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-08-28 11:51:08 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-08-28 11:51:08 +0000
commitbe6ceb6ebcfb48e09ffab297c1537c87383f0ce9 (patch)
treee05e876a1b8886b72f3abe66192ec5fdcbfe0cfa /test/Transforms
parentb1b051ec97c4e3c02cea554e169cbb4f85bcb2de (diff)
Bitcasts are transitive. Bitcast-Bitcast-X becomes Bitcast-X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/cast.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll
index f85636f8df..06cdae24b4 100644
--- a/test/Transforms/InstCombine/cast.ll
+++ b/test/Transforms/InstCombine/cast.ll
@@ -630,3 +630,17 @@ entry:
; CHECK: uitofp
}
+define <4 x float> @test64(<4 x float> %c) nounwind {
+ %t0 = bitcast <4 x float> %c to <4 x i32>
+ %t1 = bitcast <4 x i32> %t0 to <2 x double>
+ %t2 = bitcast <2 x double> %t1 to <4 x float>
+ ret <4 x float> %t2
+; CHECK: @test64
+; CHECK-NEXT: ret <4 x float> %c
+}
+
+define float @test2c() {
+ ret float extractelement (<2 x float> bitcast (double bitcast (<2 x float> <float -1.000000e+00, float -1.000000e+00> to double) to <2 x float>), i32 0)
+; CHECK: @test2c
+; CHECK-NOT: extractelement
+}