summaryrefslogtreecommitdiff
path: root/test/Transforms/SCCP/loadtest.ll
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-04 14:58:56 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-04 14:58:56 +0000
commit36bf506ad3c99a309ca8bd73bd03563d8d068ac0 (patch)
treeb4dc751bcee540346911aa4115729eff2f991657 /test/Transforms/SCCP/loadtest.ll
parentf9666f9b3a3d26810deae8cd54feb6e47ecee61a (diff)
Notes
Diffstat (limited to 'test/Transforms/SCCP/loadtest.ll')
-rw-r--r--test/Transforms/SCCP/loadtest.ll11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/Transforms/SCCP/loadtest.ll b/test/Transforms/SCCP/loadtest.ll
index fd82aef821ff6..add2af483f560 100644
--- a/test/Transforms/SCCP/loadtest.ll
+++ b/test/Transforms/SCCP/loadtest.ll
@@ -1,5 +1,6 @@
; This test makes sure that these instructions are properly constant propagated.
-;
+
+target datalayout = "e-p:32:32"
; RUN: opt < %s -sccp -S | not grep load
@@ -20,7 +21,13 @@ define float @test2() {
define i32 @test3() {
%A = getelementptr [2 x { i32, float }]* @Y, i64 0, i64 0, i32 0 ; <i32*> [#uses=1]
- %B = load i32* %A ; <i32> [#uses=1]
+ %B = load i32* %A
ret i32 %B
}
+define i8 @test4() {
+ %A = bitcast i32* @X to i8*
+ %B = load i8* %A
+ ret i8 %B
+}
+