aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-05 21:32:59 +0000
committerChris Lattner <sabre@nondot.org>2010-01-05 21:32:59 +0000
commitd9ca0a103b0e9830711a438488d9e9ccb1fd7eab (patch)
treed7654ff9369f2dbb155801802a1c4641f9566a8e /test/Transforms
parentb5d28ce157a2a8f5910c4ea8abe97045b3748f50 (diff)
downloadexternal_llvm-d9ca0a103b0e9830711a438488d9e9ccb1fd7eab.zip
external_llvm-d9ca0a103b0e9830711a438488d9e9ccb1fd7eab.tar.gz
external_llvm-d9ca0a103b0e9830711a438488d9e9ccb1fd7eab.tar.bz2
clean up tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/cast-and-cast.ll17
-rw-r--r--test/Transforms/InstCombine/cast-propagate.ll11
-rw-r--r--test/Transforms/InstCombine/load.ll9
3 files changed, 9 insertions, 28 deletions
diff --git a/test/Transforms/InstCombine/cast-and-cast.ll b/test/Transforms/InstCombine/cast-and-cast.ll
deleted file mode 100644
index eda9d99..0000000
--- a/test/Transforms/InstCombine/cast-and-cast.ll
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: opt < %s -instcombine -S | \
-; RUN: not grep bitcast
-
-define i1 @test1(i32 %val) {
- %t1 = bitcast i32 %val to i32 ; <i32> [#uses=1]
- %t2 = and i32 %t1, 1 ; <i32> [#uses=1]
- %t3 = trunc i32 %t2 to i1 ; <i1> [#uses=1]
- ret i1 %t3
-}
-
-define i16 @test1.upgrd.1(i32 %val) {
- %t1 = bitcast i32 %val to i32 ; <i32> [#uses=1]
- %t2 = and i32 %t1, 1 ; <i32> [#uses=1]
- %t3 = trunc i32 %t2 to i16 ; <i16> [#uses=1]
- ret i16 %t3
-}
-
diff --git a/test/Transforms/InstCombine/cast-propagate.ll b/test/Transforms/InstCombine/cast-propagate.ll
deleted file mode 100644
index 95c040b..0000000
--- a/test/Transforms/InstCombine/cast-propagate.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: opt < %s -instcombine -mem2reg -S | \
-; RUN: not grep load
-
-define i32 @test1(i32* %P) {
- %A = alloca i32 ; <i32*> [#uses=2]
- store i32 123, i32* %A
- ; Cast the result of the load not the source
- %Q = bitcast i32* %A to i32* ; <i32*> [#uses=1]
- %V = load i32* %Q ; <i32> [#uses=1]
- ret i32 %V
-}
diff --git a/test/Transforms/InstCombine/load.ll b/test/Transforms/InstCombine/load.ll
index 6d068f5..75c62a8 100644
--- a/test/Transforms/InstCombine/load.ll
+++ b/test/Transforms/InstCombine/load.ll
@@ -76,3 +76,12 @@ define double @test11(double* %p) {
%x = load double* %t1
ret double %x
}
+
+define i32 @test12(i32* %P) {
+ %A = alloca i32
+ store i32 123, i32* %A
+ ; Cast the result of the load not the source
+ %Q = bitcast i32* %A to i32*
+ %V = load i32* %Q
+ ret i32 %V
+}