aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-03-19 04:14:49 +0000
committerTanya Lattner <tonic@nondot.org>2008-03-19 04:14:49 +0000
commitf396cc87302d9a69b3680c339d219c49262f5bf3 (patch)
tree78cde53c3df36e7bb12a1740daafd43c225058cb
parent34000979662d9ae9b22e4d05272b77d944871d1c (diff)
Upgrade tests to not use llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48529 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/SCCP/2002-05-02-EdgeFailure.ll27
-rw-r--r--test/Transforms/SCCP/2002-05-02-MissSecondInst.ll11
-rw-r--r--test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll21
-rw-r--r--test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll51
-rw-r--r--test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll13
-rw-r--r--test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll52
-rw-r--r--test/Transforms/SCCP/2003-08-26-InvokeHandling.ll23
-rw-r--r--test/Transforms/SCCP/2004-11-16-DeadInvoke.ll19
-rw-r--r--test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll13
-rw-r--r--test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll189
-rw-r--r--test/Transforms/SCCP/2006-12-04-PackedType.ll202
-rw-r--r--test/Transforms/SCCP/2006-12-19-UndefBug.ll9
-rw-r--r--test/Transforms/SCCP/2007-05-16-InvokeCrash.ll13
-rw-r--r--test/Transforms/SCCP/basictest.ll19
-rw-r--r--test/Transforms/SCCP/calltest.ll27
-rw-r--r--test/Transforms/SCCP/ipsccp-basic.ll17
-rw-r--r--test/Transforms/SCCP/ipsccp-conditional.ll29
-rw-r--r--test/Transforms/SCCP/ipsccp-gvar.ll33
-rw-r--r--test/Transforms/SCCP/loadtest.ll30
-rw-r--r--test/Transforms/SCCP/logical-nuke.ll9
-rw-r--r--test/Transforms/SCCP/phitest.ll35
-rw-r--r--test/Transforms/SCCP/sccptest.ll44
-rw-r--r--test/Transforms/SCCP/select.ll15
23 files changed, 421 insertions, 480 deletions
diff --git a/test/Transforms/SCCP/2002-05-02-EdgeFailure.ll b/test/Transforms/SCCP/2002-05-02-EdgeFailure.ll
index 2136ca644c..13b45f59a9 100644
--- a/test/Transforms/SCCP/2002-05-02-EdgeFailure.ll
+++ b/test/Transforms/SCCP/2002-05-02-EdgeFailure.ll
@@ -5,19 +5,22 @@
; real benchmark (mst from Olden benchmark, MakeGraph function). When SCCP is
; fixed, this should be eliminated by a single SCCP application.
;
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep loop
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep loop
-int* %test() {
+define i32* @test() {
bb1:
- %A = malloc int
+ %A = malloc i32 ; <i32*> [#uses=2]
br label %bb2
-bb2:
- %i = phi int [ %i2, %bb2 ], [ 0, %bb1 ] ;; Always 0
- %i2 = add int %i, 1 ;; Always 1
- store int %i, int *%A
- %loop = setle int %i2, 0 ;; Always false
- br bool %loop, label %bb2, label %bb3
-
-bb3:
- ret int * %A
+bb2: ; preds = %bb2, %bb1
+ ;; Always 0
+ %i = phi i32 [ %i2, %bb2 ], [ 0, %bb1 ] ; <i32> [#uses=2]
+ ;; Always 1
+ %i2 = add i32 %i, 1 ; <i32> [#uses=2]
+ store i32 %i, i32* %A
+ ;; Always false
+ %loop = icmp sle i32 %i2, 0 ; <i1> [#uses=1]
+ br i1 %loop, label %bb2, label %bb3
+bb3: ; preds = %bb2
+ ret i32* %A
}
+
diff --git a/test/Transforms/SCCP/2002-05-02-MissSecondInst.ll b/test/Transforms/SCCP/2002-05-02-MissSecondInst.ll
index 24e99b19e3..fd4083d137 100644
--- a/test/Transforms/SCCP/2002-05-02-MissSecondInst.ll
+++ b/test/Transforms/SCCP/2002-05-02-MissSecondInst.ll
@@ -1,7 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep sub
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep sub
-void %test3(int, int) {
- add int 0, 0
- sub int 0, 4
- ret void
+define void @test3(i32, i32) {
+ add i32 0, 0 ; <i32>:3 [#uses=0]
+ sub i32 0, 4 ; <i32>:4 [#uses=0]
+ ret void
}
+
diff --git a/test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll b/test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
index c851efdb0e..61bf5db444 100644
--- a/test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
+++ b/test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
@@ -1,20 +1,19 @@
; This test shows a case where SCCP is incorrectly eliminating the PHI node
; because it thinks it has a constant 0 value, when it really doesn't.
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep phi
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep phi
-int "test"(int %A, bool %c) {
+define i32 @test(i32 %A, i1 %c) {
bb1:
br label %BB2
-BB2:
- %V = phi int [0, %bb1], [%A, %BB4]
+BB2: ; preds = %BB4, %bb1
+ %V = phi i32 [ 0, %bb1 ], [ %A, %BB4 ] ; <i32> [#uses=1]
br label %BB3
-
-BB3:
- br bool %c, label %BB4, label %BB5
-BB4:
+BB3: ; preds = %BB2
+ br i1 %c, label %BB4, label %BB5
+BB4: ; preds = %BB3
br label %BB2
-
-BB5:
- ret int %V
+BB5: ; preds = %BB3
+ ret i32 %V
}
+
diff --git a/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll b/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
index 231bdb95cd..b46d23a9dc 100644
--- a/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
+++ b/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
@@ -2,39 +2,32 @@
; this is in fact NOT the case, so the return should still be alive in the code
; after sccp and CFG simplification have been performed.
;
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | \
+; RUN: llvm-as < %s | opt -sccp -simplifycfg | llvm-dis | \
; RUN: grep ret
-
-void "old_main"() {
-bb3: ;[#uses=1]
+define void @old_main() {
+bb3:
br label %bb6
-
-bb6: ;[#uses=3]
- %reg403 = phi int [ %reg155, %bb14 ], [ 0, %bb3 ] ; <int> [#uses=2]
- %reg155 = add int %reg403, 1 ; <int> [#uses=3]
-
+bb6: ; preds = %bb14, %bb3
+ %reg403 = phi i32 [ %reg155, %bb14 ], [ 0, %bb3 ] ; <i32> [#uses=1]
+ %reg155 = add i32 %reg403, 1 ; <i32> [#uses=2]
br label %bb11
-
-bb11:
- %reg407 = phi int [ %reg408, %bb11 ], [ 0, %bb6 ] ; <int> [#uses=2]
- %reg408 = add int %reg407, 1 ; <int> [#uses=2]
- %cond550 = setle int %reg407, 1 ; <bool> [#uses=1]
- br bool %cond550, label %bb11, label %bb12
-
-bb12: ;[#uses=2]
+bb11: ; preds = %bb11, %bb6
+ %reg407 = phi i32 [ %reg408, %bb11 ], [ 0, %bb6 ] ; <i32> [#uses=2]
+ %reg408 = add i32 %reg407, 1 ; <i32> [#uses=1]
+ %cond550 = icmp sle i32 %reg407, 1 ; <i1> [#uses=1]
+ br i1 %cond550, label %bb11, label %bb12
+bb12: ; preds = %bb11
br label %bb13
-
-bb13: ;[#uses=3]
- %reg409 = phi int [ %reg410, %bb13 ], [ 0, %bb12 ] ; <int> [#uses=1]
- %reg410 = add int %reg409, 1 ; <int> [#uses=2]
- %cond552 = setle int %reg410, 2 ; <bool> [#uses=1]
- br bool %cond552, label %bb13, label %bb14
-
-bb14: ;[#uses=2]
- %cond553 = setle int %reg155, 31 ; <bool> [#uses=1]
- br bool %cond553, label %bb6, label %bb15
-
-bb15: ;[#uses=1]
+bb13: ; preds = %bb13, %bb12
+ %reg409 = phi i32 [ %reg410, %bb13 ], [ 0, %bb12 ] ; <i32> [#uses=1]
+ %reg410 = add i32 %reg409, 1 ; <i32> [#uses=2]
+ %cond552 = icmp sle i32 %reg410, 2 ; <i1> [#uses=1]
+ br i1 %cond552, label %bb13, label %bb14
+bb14: ; preds = %bb13
+ %cond553 = icmp sle i32 %reg155, 31 ; <i1> [#uses=1]
+ br i1 %cond553, label %bb6, label %bb15
+bb15: ; preds = %bb14
ret void
}
+
diff --git a/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll b/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll
index 1577685717..c5a7c790bd 100644
--- a/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll
+++ b/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll
@@ -1,10 +1,9 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep %X
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep %X
-%G = uninitialized global [40x int]
+@G = external global [40 x i32] ; <[40 x i32]*> [#uses=1]
-implementation
-
-int* %test() {
- %X = getelementptr [40x int]* %G, uint 0, uint 0
- ret int* %X
+define i32* @test() {
+ %X = getelementptr [40 x i32]* @G, i64 0, i64 0 ; <i32*> [#uses=1]
+ ret i32* %X
}
+
diff --git a/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll b/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll
index fd4713a31e..03ff4dde8a 100644
--- a/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll
+++ b/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll
@@ -1,34 +1,30 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | \
+; RUN: llvm-as < %s | opt -sccp -simplifycfg | llvm-dis | \
; RUN: not grep then:
-void %cprop_test11(int* %data.1) {
-entry: ; No predecessors!
- %tmp.1 = load int* %data.1 ; <int> [#uses=3]
- %tmp.41 = setgt int %tmp.1, 1 ; <bool> [#uses=1]
- br bool %tmp.41, label %no_exit, label %loopexit
-
-no_exit: ; preds = %entry, %then, %endif
- %j.0 = phi int [ %j.0, %endif ], [ %i.0, %then ], [ 1, %entry ] ; <int> [#uses=3]
- %i.0 = phi int [ %inc, %endif ], [ %inc1, %then ], [ 1, %entry ] ; <int> [#uses=4]
- %tmp.8.not = cast int %j.0 to bool ; <bool> [#uses=1]
- br bool %tmp.8.not, label %endif, label %then
-
+define void @cprop_test11(i32* %data.1) {
+entry:
+ %tmp.1 = load i32* %data.1 ; <i32> [#uses=3]
+ %tmp.41 = icmp sgt i32 %tmp.1, 1 ; <i1> [#uses=1]
+ br i1 %tmp.41, label %no_exit, label %loopexit
+no_exit: ; preds = %endif, %then, %entry
+ %j.0 = phi i32 [ %j.0, %endif ], [ %i.0, %then ], [ 1, %entry ] ; <i32> [#uses=3]
+ %i.0 = phi i32 [ %inc, %endif ], [ %inc1, %then ], [ 1, %entry ] ; <i32> [#uses=4]
+ %tmp.8.not = icmp ne i32 %j.0, 0 ; <i1> [#uses=1]
+ br i1 %tmp.8.not, label %endif, label %then
then: ; preds = %no_exit
- %inc1 = add int %i.0, 1 ; <int> [#uses=3]
- %tmp.42 = setlt int %inc1, %tmp.1 ; <bool> [#uses=1]
- br bool %tmp.42, label %no_exit, label %loopexit
-
+ %inc1 = add i32 %i.0, 1 ; <i32> [#uses=3]
+ %tmp.42 = icmp slt i32 %inc1, %tmp.1 ; <i1> [#uses=1]
+ br i1 %tmp.42, label %no_exit, label %loopexit
endif: ; preds = %no_exit
- %inc = add int %i.0, 1 ; <int> [#uses=3]
- %tmp.4 = setlt int %inc, %tmp.1 ; <bool> [#uses=1]
- br bool %tmp.4, label %no_exit, label %loopexit
-
-loopexit: ; preds = %entry, %endif, %then
- %j.1 = phi int [ 1, %entry ], [ %j.0, %endif ], [ %i.0, %then ] ; <int> [#uses=1]
- %i.1 = phi int [ 1, %entry ], [ %inc, %endif ], [ %inc1, %then ] ; <int> [#uses=1]
- %tmp.17 = getelementptr int* %data.1, long 1 ; <int*> [#uses=1]
- store int %j.1, int* %tmp.17
- %tmp.23 = getelementptr int* %data.1, long 2 ; <int*> [#uses=1]
- store int %i.1, int* %tmp.23
+ %inc = add i32 %i.0, 1 ; <i32> [#uses=3]
+ %tmp.4 = icmp slt i32 %inc, %tmp.1 ; <i1> [#uses=1]
+ br i1 %tmp.4, label %no_exit, label %loopexit
+loopexit: ; preds = %endif, %then, %entry
+ %j.1 = phi i32 [ 1, %entry ], [ %j.0, %endif ], [ %i.0, %then ] ; <i32> [#uses=1]
+ %i.1 = phi i32 [ 1, %entry ], [ %inc, %endif ], [ %inc1, %then ] ; <i32> [#uses=1]
+ %tmp.17 = getelementptr i32* %data.1, i64 1 ; <i32*> [#uses=1]
+ store i32 %j.1, i32* %tmp.17
+ %tmp.23 = getelementptr i32* %data.1, i64 2 ; <i32*> [#uses=1]
+ store i32 %i.1, i32* %tmp.23
ret void
}
diff --git a/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll b/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll
index 36bfba4a40..020af7d16c 100644
--- a/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll
+++ b/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll
@@ -1,15 +1,18 @@
; The PHI cannot be eliminated from this testcase, SCCP is mishandling invoke's!
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep phi
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep phi
-declare void %foo()
-int %test(bool %cond) {
+declare void @foo()
+
+define i32 @test(i1 %cond) {
Entry:
- br bool %cond, label %Inv, label %Cont
-Inv:
- invoke void %foo() to label %Ok except label %Cont
-Ok:
+ br i1 %cond, label %Inv, label %Cont
+Inv: ; preds = %Entry
+ invoke void @foo( )
+ to label %Ok unwind label %Cont
+Ok: ; preds = %Inv
br label %Cont
-Cont:
- %X = phi int [0, %Entry], [1,%Ok], [0, %Inv]
- ret int %X
+Cont: ; preds = %Ok, %Inv, %Entry
+ %X = phi i32 [ 0, %Entry ], [ 1, %Ok ], [ 0, %Inv ] ; <i32> [#uses=1]
+ ret i32 %X
}
+
diff --git a/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll b/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll
index 544edc0b3c..cf64677334 100644
--- a/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll
+++ b/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll
@@ -1,14 +1,13 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -disable-output
+; RUN: llvm-as < %s | opt -sccp -disable-output
-implementation
+declare i32 @foo()
-declare int %foo()
-
-void %caller() {
- br bool true, label %T, label %F
-F:
- %X = invoke int %foo() to label %T unwind label %T
-
-T:
+define void @caller() {
+ br i1 true, label %T, label %F
+F: ; preds = %0
+ %X = invoke i32 @foo( )
+ to label %T unwind label %T ; <i32> [#uses=0]
+T: ; preds = %F, %F, %0
ret void
}
+
diff --git a/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll b/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll
index c662e0f711..6592e8b089 100644
--- a/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll
+++ b/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll
@@ -1,11 +1,12 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep {ret i32 1}
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep {ret i32 1}
; This function definitely returns 1, even if we don't know the direction
; of the branch.
-int %foo() {
- br bool undef, label %T, label %T
-T:
- %X = add int 0, 1
- ret int %X
+define i32 @foo() {
+ br i1 undef, label %T, label %T
+T: ; preds = %0, %0
+ %X = add i32 0, 1 ; <i32> [#uses=1]
+ ret i32 %X
}
+
diff --git a/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll b/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll
index edfbe016c4..299b79f53e 100644
--- a/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll
+++ b/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll
@@ -1,128 +1,103 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -disable-output
-
-target endian = big
-target pointersize = 32
+; RUN: llvm-as < %s | opt -sccp -disable-output
+; END.
+target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin8.7.0"
- %struct.pat_list = type { int, %struct.pat_list* }
-%JUMP = external global int ; <int*> [#uses=1]
-%old_D_pat = external global [16 x ubyte] ; <[16 x ubyte]*> [#uses=0]
-
-implementation ; Functions:
+ %struct.pat_list = type { i32, %struct.pat_list* }
+@JUMP = external global i32 ; <i32*> [#uses=1]
+@old_D_pat = external global [16 x i8] ; <[16 x i8]*> [#uses=0]
-void %asearch1(uint %D) {
+define void @asearch1(i32 %D) {
entry:
- %tmp80 = setlt uint 0, %D ; <bool> [#uses=1]
- br bool %tmp80, label %bb647.preheader, label %cond_true81.preheader
-
-cond_true81.preheader: ; preds = %entry
- ret void
-
-bb647.preheader: ; preds = %entry
- %tmp3.i = call int %read( ) ; <int> [#uses=1]
- %tmp6.i = add int %tmp3.i, 0 ; <int> [#uses=1]
- %tmp653 = setgt int %tmp6.i, 0 ; <bool> [#uses=1]
- br bool %tmp653, label %cond_true654, label %UnifiedReturnBlock
-
-cond_true612: ; preds = %cond_true654
- ret void
-
-cond_next624: ; preds = %cond_true654
- ret void
-
-cond_true654: ; preds = %bb647.preheader
- br bool undef, label %cond_true612, label %cond_next624
-
-UnifiedReturnBlock: ; preds = %bb647.preheader
- ret void
+ %tmp80 = icmp ult i32 0, %D ; <i1> [#uses=1]
+ br i1 %tmp80, label %bb647.preheader, label %cond_true81.preheader
+cond_true81.preheader: ; preds = %entry
+ ret void
+bb647.preheader: ; preds = %entry
+ %tmp3.i = call i32 @read( ) ; <i32> [#uses=1]
+ %tmp6.i = add i32 %tmp3.i, 0 ; <i32> [#uses=1]
+ %tmp653 = icmp sgt i32 %tmp6.i, 0 ; <i1> [#uses=1]
+ br i1 %tmp653, label %cond_true654, label %UnifiedReturnBlock
+cond_true612: ; preds = %cond_true654
+ ret void
+cond_next624: ; preds = %cond_true654
+ ret void
+cond_true654: ; preds = %bb647.preheader
+ br i1 undef, label %cond_true612, label %cond_next624
+UnifiedReturnBlock: ; preds = %bb647.preheader
+ ret void
}
-void %bitap(int %D) {
+define void @bitap(i32 %D) {
entry:
- %tmp29 = seteq int 0, 0 ; <bool> [#uses=1]
- br bool %tmp29, label %cond_next50, label %cond_next37
-
-cond_next37: ; preds = %entry
- ret void
-
-cond_next50: ; preds = %entry
- %tmp52 = setgt int %D, 0 ; <bool> [#uses=1]
- br bool %tmp52, label %cond_true53, label %cond_next71
-
-cond_true53: ; preds = %cond_next50
- %tmp54 = load int* %JUMP ; <int> [#uses=1]
- %tmp55 = seteq int %tmp54, 1 ; <bool> [#uses=1]
- br bool %tmp55, label %cond_true56, label %cond_next63
-
-cond_true56: ; preds = %cond_true53
- %tmp57 = cast int %D to uint ; <uint> [#uses=1]
- call void %asearch1( uint %tmp57 )
- ret void
-
-cond_next63: ; preds = %cond_true53
- ret void
-
-cond_next71: ; preds = %cond_next50
- ret void
+ %tmp29 = icmp eq i32 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp29, label %cond_next50, label %cond_next37
+cond_next37: ; preds = %entry
+ ret void
+cond_next50: ; preds = %entry
+ %tmp52 = icmp sgt i32 %D, 0 ; <i1> [#uses=1]
+ br i1 %tmp52, label %cond_true53, label %cond_next71
+cond_true53: ; preds = %cond_next50
+ %tmp54 = load i32* @JUMP ; <i32> [#uses=1]
+ %tmp55 = icmp eq i32 %tmp54, 1 ; <i1> [#uses=1]
+ br i1 %tmp55, label %cond_true56, label %cond_next63
+cond_true56: ; preds = %cond_true53
+ %tmp57 = bitcast i32 %D to i32 ; <i32> [#uses=1]
+ call void @asearch1( i32 %tmp57 )
+ ret void
+cond_next63: ; preds = %cond_true53
+ ret void
+cond_next71: ; preds = %cond_next50
+ ret void
}
-declare int %read()
+declare i32 @read()
-void %initial_value() {
+define void @initial_value() {
entry:
- ret void
+ ret void
}
-void %main() {
+define void @main() {
entry:
- br label %cond_next252
-
-cond_next208: ; preds = %cond_true260
- %tmp229 = call int %atoi( ) ; <int> [#uses=1]
- br label %cond_next252
-
-bb217: ; preds = %cond_true260
- ret void
-
-cond_next252: ; preds = %cond_next208, %entry
- %D.0.0 = phi int [ 0, %entry ], [ %tmp229, %cond_next208 ] ; <int> [#uses=1]
- %tmp254 = getelementptr sbyte** null, int 1 ; <sbyte**> [#uses=1]
- %tmp256 = load sbyte** %tmp254 ; <sbyte*> [#uses=1]
- %tmp258 = load sbyte* %tmp256 ; <sbyte> [#uses=1]
- %tmp259 = seteq sbyte %tmp258, 45 ; <bool> [#uses=1]
- br bool %tmp259, label %cond_true260, label %bb263
-
-cond_true260: ; preds = %cond_next252
- %tmp205818 = setgt sbyte 0, -1 ; <bool> [#uses=1]
- br bool %tmp205818, label %cond_next208, label %bb217
-
-bb263: ; preds = %cond_next252
- %tmp265 = seteq int 0, 0 ; <bool> [#uses=1]
- br bool %tmp265, label %cond_next276, label %cond_true266
-
-cond_true266: ; preds = %bb263
- ret void
-
-cond_next276: ; preds = %bb263
- %tmp278 = seteq int 0, 0 ; <bool> [#uses=1]
- br bool %tmp278, label %cond_next298, label %cond_true279
-
-cond_true279: ; preds = %cond_next276
- ret void
-
-cond_next298: ; preds = %cond_next276
- call void %bitap( int %D.0.0 )
- ret void
+ br label %cond_next252
+cond_next208: ; preds = %cond_true260
+ %tmp229 = call i32 @atoi( ) ; <i32> [#uses=1]
+ br label %cond_next252
+bb217: ; preds = %cond_true260
+ ret void
+cond_next252: ; preds = %cond_next208, %entry
+ %D.0.0 = phi i32 [ 0, %entry ], [ %tmp229, %cond_next208 ] ; <i32> [#uses=1]
+ %tmp254 = getelementptr i8** null, i32 1 ; <i8**> [#uses=1]
+ %tmp256 = load i8** %tmp254 ; <i8*> [#uses=1]
+ %tmp258 = load i8* %tmp256 ; <i8> [#uses=1]
+ %tmp259 = icmp eq i8 %tmp258, 45 ; <i1> [#uses=1]
+ br i1 %tmp259, label %cond_true260, label %bb263
+cond_true260: ; preds = %cond_next252
+ %tmp205818 = icmp sgt i8 0, -1 ; <i1> [#uses=1]
+ br i1 %tmp205818, label %cond_next208, label %bb217
+bb263: ; preds = %cond_next252
+ %tmp265 = icmp eq i32 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp265, label %cond_next276, label %cond_true266
+cond_true266: ; preds = %bb263
+ ret void
+cond_next276: ; preds = %bb263
+ %tmp278 = icmp eq i32 0, 0 ; <i1> [#uses=1]
+ br i1 %tmp278, label %cond_next298, label %cond_true279
+cond_true279: ; preds = %cond_next276
+ ret void
+cond_next298: ; preds = %cond_next276
+ call void @bitap( i32 %D.0.0 )
+ ret void
}
-declare int %atoi()
+declare i32 @atoi()
-void %subset_pset() {
+define void @subset_pset() {
entry:
- ret void
+ ret void
}
-void %strcmp() {
+define void @strcmp() {
entry:
- ret void
+ ret void
}
-
diff --git a/test/Transforms/SCCP/2006-12-04-PackedType.ll b/test/Transforms/SCCP/2006-12-04-PackedType.ll
index 4868c30783..b7a7880b0f 100644
--- a/test/Transforms/SCCP/2006-12-04-PackedType.ll
+++ b/test/Transforms/SCCP/2006-12-04-PackedType.ll
@@ -1,150 +1,140 @@
-; Test VectorType handling by SCCP.
+; Test VectorType handling by SCCP.
; SCCP ignores VectorTypes until PR 1034 is fixed
;
-; RUN: llvm-upgrade < %s | llvm-as | opt -sccp
+; RUN: llvm-as < %s | opt -sccp
; END.
+
target datalayout = "E-p:32:32"
-target endian = big
-target pointersize = 32
target triple = "powerpc-apple-darwin8"
- %struct.GLDAlphaTest = type { float, ushort, ubyte, ubyte }
- %struct.GLDArrayRange = type { ubyte, ubyte, ubyte, ubyte }
- %struct.GLDBlendMode = type { ushort, ushort, ushort, ushort, %struct.GLTColor4, ushort, ushort, ubyte, ubyte, ubyte, ubyte }
+ %struct.GLDAlphaTest = type { float, i16, i8, i8 }
+ %struct.GLDArrayRange = type { i8, i8, i8, i8 }
+ %struct.GLDBlendMode = type { i16, i16, i16, i16, %struct.GLTColor4, i16, i16, i8, i8, i8, i8 }
%struct.GLDBufferRec = type opaque
- %struct.GLDBufferstate = type { %struct.GLTDimensions, %struct.GLTDimensions, %struct.GLTFixedColor4, %struct.GLTFixedColor4, ubyte, ubyte, ubyte, ubyte, [2 x %struct.GLSBuffer], [4 x %struct.GLSBuffer], %struct.GLSBuffer, %struct.GLSBuffer, %struct.GLSBuffer, [4 x %struct.GLSBuffer*], %struct.GLSBuffer*, %struct.GLSBuffer*, %struct.GLSBuffer*, ubyte, ubyte }
- %struct.GLDClearColor = type { double, %struct.GLTColor4, %struct.GLTColor4, float, int }
- %struct.GLDClipPlane = type { uint, [6 x %struct.GLTColor4] }
- %struct.GLDColorBuffer = type { ushort, ushort, [4 x ushort] }
+ %struct.GLDBufferstate = type { %struct.GLTDimensions, %struct.GLTDimensions, %struct.GLTFixedColor4, %struct.GLTFixedColor4, i8, i8, i8, i8, [2 x %struct.GLSBuffer], [4 x %struct.GLSBuffer], %struct.GLSBuffer, %struct.GLSBuffer, %struct.GLSBuffer, [4 x %struct.GLSBuffer*], %struct.GLSBuffer*, %struct.GLSBuffer*, %struct.GLSBuffer*, i8, i8 }
+ %struct.GLDClearColor = type { double, %struct.GLTColor4, %struct.GLTColor4, float, i32 }
+ %struct.GLDClipPlane = type { i32, [6 x %struct.GLTColor4] }
+ %struct.GLDColorBuffer = type { i16, i16, [4 x i16] }
%struct.GLDColorMatrix = type { [16 x float]*, %struct.GLDImagingColorScale }
- %struct.GLDContextRec = type { float, float, float, float, float, float, float, float, %struct.GLTColor4, %struct.GLTColor4, %struct.GLVMFPContext, %struct.GLDTextureMachine, %struct.GLGProcessor, %struct._GLVMConstants*, void (%struct.GLDContextRec*, int, int, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, int)*, %struct._GLVMFunction*, void (%struct.GLDContextRec*, %struct.GLDVertex*)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*, %struct.GLDVertex*)*, %struct._GLVMFunction*, %struct._GLVMFunction*, %struct._GLVMFunction*, uint, uint, uint, float, float, float, uint, %struct.GLSDrawable, %struct.GLDRect, %struct.GLDFormat, %struct.GLDBufferstate, %struct.GLDSharedRec*, %struct.GLDState*, %struct.GLDPluginState*, %struct.GLTDimensions, %struct.GLTColor4*, %struct.GLTColor4*, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, %struct.GLDPipelineProgramRec*, %struct.GLDStateProgramRec, %struct.GLVMTextures, { [4 x sbyte*], sbyte*, sbyte* }, [64 x float], %struct.GLDStippleData, ushort, ubyte, ubyte, uint, %struct.GLDFramebufferRec*, ubyte, %struct.GLDQueryRec*, %struct.GLDQueryRec* }
- %struct.GLDConvolution = type { %struct.GLTColor4, %struct.GLDImagingColorScale, ushort, ushort, float*, int, int }
- %struct.GLDDepthTest = type { ushort, ushort, ubyte, ubyte, ubyte, ubyte, double, double }
- %struct.GLDFogMode = type { %struct.GLTColor4, float, float, float, float, float, ushort, ushort, ushort, ubyte, ubyte }
- %struct.GLDFormat = type { int, int, int, int, int, int, uint, uint, ubyte, ubyte, ubyte, ubyte, int, int, int }
- %struct.GLDFramebufferAttachment = type { uint, uint, uint, int, uint, uint }
- %struct.GLDFramebufferData = type { [6 x %struct.GLDFramebufferAttachment], [4 x ushort], ushort, ushort, ushort, ushort, uint }
+ %struct.GLDContextRec = type { float, float, float, float, float, float, float, float, %struct.GLTColor4, %struct.GLTColor4, %struct.GLVMFPContext, %struct.GLDTextureMachine, %struct.GLGProcessor, %struct._GLVMConstants*, void (%struct.GLDContextRec*, i32, i32, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, i32)*, %struct._GLVMFunction*, void (%struct.GLDContextRec*, %struct.GLDVertex*)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*, %struct.GLDVertex*)*, %struct._GLVMFunction*, %struct._GLVMFunction*, %struct._GLVMFunction*, i32, i32, i32, float, float, float, i32, %struct.GLSDrawable, %struct.GLDFramebufferAttachment, %struct.GLDFormat, %struct.GLDBufferstate, %struct.GLDSharedRec*, %struct.GLDState*, %struct.GLDPluginState*, %struct.GLTDimensions, %struct.GLTColor4*, %struct.GLTColor4*, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, %struct.GLDPipelineProgramRec*, %struct.GLDStateProgramRec, %struct.GLVMTextures, { [4 x i8*], i8*, i8* }, [64 x float], %struct.GLDStippleData, i16, i8, i8, i32, %struct.GLDFramebufferRec*, i8, %struct.GLDQueryRec*, %struct.GLDQueryRec* }
+ %struct.GLDConvolution = type { %struct.GLTColor4, %struct.GLDImagingColorScale, i16, i16, float*, i32, i32 }
+ %struct.GLDDepthTest = type { i16, i16, i8, i8, i8, i8, double, double }
+ %struct.GLDFogMode = type { %struct.GLTColor4, float, float, float, float, float, i16, i16, i16, i8, i8 }
+ %struct.GLDFormat = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32 }
+ %struct.GLDFramebufferAttachment = type { i32, i32, i32, i32, i32, i32 }
+ %struct.GLDFramebufferData = type { [6 x %struct.GLDFramebufferAttachment], [4 x i16], i16, i16, i16, i16, i32 }
%struct.GLDFramebufferRec = type { %struct.GLDFramebufferData*, %struct.GLDPluginFramebufferData*, %struct.GLDPixelFormat }
- %struct.GLDHintMode = type { ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort }
- %struct.GLDHistogram = type { %struct.GLTFixedColor4*, int, ushort, ubyte, ubyte }
+ %struct.GLDHintMode = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
+ %struct.GLDHistogram = type { %struct.GLTFixedColor4*, i32, i16, i8, i8 }
%struct.GLDImagingColorScale = type { { float, float }, { float, float }, { float, float }, { float, float } }
- %struct.GLDImagingSubset = type { %struct.GLDConvolution, %struct.GLDConvolution, %struct.GLDConvolution, %struct.GLDColorMatrix, %struct.GLDMinmax, %struct.GLDHistogram, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, uint }
+ %struct.GLDImagingSubset = type { %struct.GLDConvolution, %struct.GLDConvolution, %struct.GLDConvolution, %struct.GLDColorMatrix, %struct.GLDMinmax, %struct.GLDHistogram, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, i32 }
%struct.GLDLight = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTCoord3, float, float, float, float, float, %struct.GLTCoord3, float, float, float, float, float }
- %struct.GLDLightModel = type { %struct.GLTColor4, [8 x %struct.GLDLight], [2 x %struct.GLDMaterial], uint, ushort, ushort, ushort, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte }
+ %struct.GLDLightModel = type { %struct.GLTColor4, [8 x %struct.GLDLight], [2 x %struct.GLDMaterial], i32, i16, i16, i16, i8, i8, i8, i8, i8, i8 }
%struct.GLDLightProduct = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4 }
- %struct.GLDLineMode = type { float, int, ushort, ushort, ubyte, ubyte, ubyte, ubyte }
- %struct.GLDLogicOp = type { ushort, ubyte, ubyte }
- %struct.GLDMaskMode = type { uint, [3 x uint], ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte }
- %struct.GLDMaterial = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, float, float, float, float, [8 x %struct.GLDLightProduct], %struct.GLTColor4, [6 x int], [2 x int] }
- %struct.GLDMinmax = type { %struct.GLDMinmaxTable*, ushort, ubyte, ubyte }
+ %struct.GLDLineMode = type { float, i32, i16, i16, i8, i8, i8, i8 }
+ %struct.GLDLogicOp = type { i16, i8, i8 }
+ %struct.GLDMaskMode = type { i32, [3 x i32], i8, i8, i8, i8, i8, i8, i8, i8 }
+ %struct.GLDMaterial = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, float, float, float, float, [8 x %struct.GLDLightProduct], %struct.GLTColor4, [6 x i32], [2 x i32] }
+ %struct.GLDMinmax = type { %struct.GLDMinmaxTable*, i16, i8, i8 }
%struct.GLDMinmaxTable = type { %struct.GLTColor4, %struct.GLTColor4 }
- %struct.GLDMipmaplevel = type { [4 x uint], [4 x float], [4 x uint], [4 x uint], [4 x float], [4 x uint], [3 x uint], uint, float*, float*, float*, uint, uint, sbyte*, short, ushort, ushort, short }
- %struct.GLDMultisample = type { float, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte }
- %struct.GLDPipelineProgramData = type { ushort, ushort, uint, %struct._PPStreamToken*, ulong, %struct.GLDShaderSourceData*, %struct.GLTColor4*, uint }
- %struct.GLDPipelineProgramRec = type { %struct.GLDPipelineProgramData*, %struct._PPStreamToken*, %struct._PPStreamToken*, %struct._GLVMFunction*, uint, uint, uint }
- %struct.GLDPipelineProgramState = type { ubyte, ubyte, ubyte, ubyte, %struct.GLTColor4* }
- %struct.GLDPixelFormat = type { ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte }
- %struct.GLDPixelMap = type { int*, float*, float*, float*, float*, float*, float*, float*, float*, int*, int, int, int, int, int, int, int, int, int, int }
- %struct.GLDPixelMode = type { float, float, %struct.GLDPixelStore, %struct.GLDPixelTransfer, %struct.GLDPixelMap, %struct.GLDImagingSubset, uint, uint }
- %struct.GLDPixelPack = type { int, int, int, int, int, int, int, int, ubyte, ubyte, ubyte, ubyte }
+ %struct.GLDMipmaplevel = type { [4 x i32], [4 x float], [4 x i32], [4 x i32], [4 x float], [4 x i32], [3 x i32], i32, float*, float*, float*, i32, i32, i8*, i16, i16, i16, i16 }
+ %struct.GLDMultisample = type { float, i8, i8, i8, i8, i8, i8, i8, i8 }
+ %struct.GLDPipelineProgramData = type { i16, i16, i32, %struct._PPStreamToken*, i64, %struct.GLDShaderSourceData*, %struct.GLTColor4*, i32 }
+ %struct.GLDPipelineProgramRec = type { %struct.GLDPipelineProgramData*, %struct._PPStreamToken*, %struct._PPStreamToken*, %struct._GLVMFunction*, i32, i32, i32 }
+ %struct.GLDPipelineProgramState = type { i8, i8, i8, i8, %struct.GLTColor4* }
+ %struct.GLDPixelFormat = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
+ %struct.GLDPixelMap = type { i32*, float*, float*, float*, float*, float*, float*, float*, float*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
+ %struct.GLDPixelMode = type { float, float, %struct.GLDPixelStore, %struct.GLDPixelTransfer, %struct.GLDPixelMap, %struct.GLDImagingSubset, i32, i32 }
+ %struct.GLDPixelPack = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8 }
%struct.GLDPixelStore = type { %struct.GLDPixelPack, %struct.GLDPixelPack }
- %struct.GLDPixelTransfer = type { float, float, float, float, float, float, float, float, float, float, int, int, float, float, float, float, float, float, float, float, float, float, float, float }
- %struct.GLDPluginFramebufferData = type { [6 x %struct.GLDTextureRec*], uint, uint }
- %struct.GLDPluginProgramData = type { [3 x %struct.GLDPipelineProgramRec*], %struct.GLDBufferRec**, uint }
+ %struct.GLDPixelTransfer = type { float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float }
+ %struct.GLDPluginFramebufferData = type { [6 x %struct.GLDTextureRec*], i32, i32 }
+ %struct.GLDPluginProgramData = type { [3 x %struct.GLDPipelineProgramRec*], %struct.GLDBufferRec**, i32 }
%struct.GLDPluginState = type { [16 x [5 x %struct.GLDTextureRec*]], [3 x %struct.GLDTextureRec*], [16 x %struct.GLDTextureRec*], [3 x %struct.GLDPipelineProgramRec*], %struct.GLDProgramRec*, %struct.GLDVertexArrayRec*, [16 x %struct.GLDBufferRec*], %struct.GLDFramebufferRec*, %struct.GLDFramebufferRec* }
- %struct.GLDPointMode = type { float, float, float, float, %struct.GLTCoord3, float, ubyte, ubyte, ubyte, ubyte, ushort, ushort, uint, ushort, ushort }
- %struct.GLDPolygonMode = type { [128 x ubyte], float, float, ushort, ushort, ushort, ushort, ubyte, ubyte, ubyte, u