From 3e7dbaf22dcf39b1d852ccd1b4efaffc421460ee Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 5 Jan 2010 21:32:59 +0000 Subject: [PATCH] clean up tests. llvm-svn: 92776 --- test/Transforms/InstCombine/cast-and-cast.ll | 17 ----------------- test/Transforms/InstCombine/cast-propagate.ll | 11 ----------- test/Transforms/InstCombine/load.ll | 9 +++++++++ 3 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 test/Transforms/InstCombine/cast-and-cast.ll delete mode 100644 test/Transforms/InstCombine/cast-propagate.ll diff --git a/test/Transforms/InstCombine/cast-and-cast.ll b/test/Transforms/InstCombine/cast-and-cast.ll deleted file mode 100644 index eda9d998be9..00000000000 --- 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 ; [#uses=1] - %t2 = and i32 %t1, 1 ; [#uses=1] - %t3 = trunc i32 %t2 to i1 ; [#uses=1] - ret i1 %t3 -} - -define i16 @test1.upgrd.1(i32 %val) { - %t1 = bitcast i32 %val to i32 ; [#uses=1] - %t2 = and i32 %t1, 1 ; [#uses=1] - %t3 = trunc i32 %t2 to 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 95c040b140d..00000000000 --- 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 ; [#uses=2] - store i32 123, i32* %A - ; Cast the result of the load not the source - %Q = bitcast i32* %A to i32* ; [#uses=1] - %V = load i32* %Q ; [#uses=1] - ret i32 %V -} diff --git a/test/Transforms/InstCombine/load.ll b/test/Transforms/InstCombine/load.ll index 6d068f55dce..75c62a83091 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 +}