aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-09-05 08:46:41 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-09-05 08:46:41 -0700
commit1180f259c88b1eb1000d0aaf5753b3da9f8e4e51 (patch)
tree93e5a4aa9aa5c5cedf8fe2c1137bef15e0ef081a /test
parentd8f9bfbc093e7e0c1fab719bc014ba7c6f94ad6d (diff)
PNaCl bitcode: Don't output the LABEL type in the type table
The type ID for the "label" type is never referenced. The "label" type was only being added to the type table because EnumerateType() treats BasicBlock and Value operands the same. However, the rest of the reader and writer treat BasicBlock operands specially and not like other Values. Change some tests to use wildcards for some type IDs. This is so that I don't have to update all the type ID numbers now that the generated type tables have changed. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3590 TEST=run small_tests with v2 bitcode format enabled Review URL: https://codereview.chromium.org/23530031
Diffstat (limited to 'test')
-rw-r--r--test/NaCl/Bitcode/ptrtoint-elide.ll110
-rw-r--r--test/NaCl/Bitcode/switch.ll7
2 files changed, 58 insertions, 59 deletions
diff --git a/test/NaCl/Bitcode/ptrtoint-elide.ll b/test/NaCl/Bitcode/ptrtoint-elide.ll
index 3ef7909fe7..bfca601d3f 100644
--- a/test/NaCl/Bitcode/ptrtoint-elide.ll
+++ b/test/NaCl/Bitcode/ptrtoint-elide.ll
@@ -42,8 +42,8 @@ define void @AllocCastSimple() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
-; PF1-NEXT: <INST_CAST op0=4 op1=4 op2=11/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
+; PF1-NEXT: <INST_CAST op0=4 op1={{.*}} op2=11/>
; PF1-NEXT: <INST_STORE op0=1 op1=2 op2=1 op3=0/>
; PF1-NEXT: <INST_RET/>
; PF1-NEXT: </FUNCTION_BLOCK>
@@ -87,8 +87,8 @@ define void @AllocCastSimpleReversed() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=3 op1=4 op2=11/>
-; PF1-NEXT: <INST_CAST op0=2 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=3 op1={{.*}} op2=11/>
+; PF1-NEXT: <INST_CAST op0=2 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_STORE op0=2 op1=1 op2=1 op3=0/>
; PF1-NEXT: <INST_RET/>
; PF1-NEXT: </FUNCTION_BLOCK>
@@ -130,9 +130,9 @@ define void @AllocCastDelete() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_ALLOCA op0=3 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_RET/>
; PF1-NEXT: </FUNCTION_BLOCK>
@@ -175,8 +175,8 @@ define void @AllocCastOpt() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=3 op1=4 op2=11/>
-; PF1-NEXT: <INST_CAST op0=2 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=3 op1={{.*}} op2=11/>
+; PF1-NEXT: <INST_CAST op0=2 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_STORE op0=2 op1=1 op2=1 op3=0/>
; PF1-NEXT: <INST_STORE op0=2 op1=1 op2=1 op3=0/>
; PF1-NEXT: <INST_RET/>
@@ -224,8 +224,8 @@ define void @AllocCastMove(i32) {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=2 op1=4/>
-; PF1-NEXT: <INST_CAST op0=5 op1=4 op2=11/>
-; PF1-NEXT: <INST_CAST op0=2 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=5 op1={{.*}} op2=11/>
+; PF1-NEXT: <INST_CAST op0=2 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BINOP op0=6 op1=4 op2=0/>
; PF1-NEXT: <INST_STORE op0=3 op1=2 op2=1 op3=0/>
; PF1-NEXT: <INST_RET/>
@@ -271,8 +271,8 @@ define void @StoreGlobal() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=3 op1=0 op2=9/>
-; PF1-NEXT: <INST_CAST op0=2 op1=4 op2=11/>
+; PF1-NEXT: <INST_CAST op0=3 op1={{.*}} op2=9/>
+; PF1-NEXT: <INST_CAST op0=2 op1={{.*}} op2=11/>
; PF1-NEXT: <INST_STORE op0=1 op1=2 op2=1 op3=0/>
; PF1-NEXT: <INST_RET/>
; PF1-NEXT: </FUNCTION_BLOCK>
@@ -314,8 +314,8 @@ define void @StoreGlobalCastsReversed() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=4 op2=11/>
-; PF1-NEXT: <INST_CAST op0=4 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=11/>
+; PF1-NEXT: <INST_CAST op0=4 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_STORE op0=2 op1=1 op2=1 op3=0/>
; PF1-NEXT: <INST_RET/>
; PF1-NEXT: </FUNCTION_BLOCK>
@@ -356,9 +356,9 @@ define i32 @StoreGlobalMovePtr2Int() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
-; PF1-NEXT: <INST_CAST op0=3 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=3 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_ALLOCA op0=3 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=4 op2=11/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=11/>
; PF1-NEXT: <INST_STORE op0=1 op1=3 op2=1 op3=0/>
; PF1-NEXT: <INST_RET op0=4/>
; PF1-NEXT: </FUNCTION_BLOCK>
@@ -413,7 +413,7 @@ define void @CastAddAlloca() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BINOP op0=5 op1=4 op2=0/>
; PF1-NEXT: <INST_BINOP op0=2 op1=5 op2=0/>
; PF1-NEXT: <INST_BINOP op0=7 op1=3 op2=0/>
@@ -472,7 +472,7 @@ define void @CastAddGlobal() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
-; PF1-NEXT: <INST_CAST op0=3 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=3 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BINOP op0=3 op1=2 op2=0/>
; PF1-NEXT: <INST_BINOP op0=2 op1=3 op2=0/>
; PF1-NEXT: <INST_BINOP op0=5 op1=3 op2=0/>
@@ -540,8 +540,8 @@ define void @CastBinop() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
-; PF1-NEXT: <INST_CAST op0=4 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
+; PF1-NEXT: <INST_CAST op0=4 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BINOP op0=2 op1=1 op2=1/>
; PF1-NEXT: <INST_BINOP op0=3 op1=2 op2=2/>
; PF1-NEXT: <INST_BINOP op0=4 op1=3 op2=3/>
@@ -635,17 +635,17 @@ define void @TestCasts() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=2 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
-; PF1-NEXT: <INST_CAST op0=6 op1=2 op2=0/>
-; PF1-NEXT: <INST_CAST op0=2 op1=2 op2=0/>
-; PF1-NEXT: <INST_CAST op0=8 op1=11 op2=1/>
-; PF1-NEXT: <INST_CAST op0=4 op1=11 op2=1/>
-; PF1-NEXT: <INST_CAST op0=9 op1=11 op2=2/>
-; PF1-NEXT: <INST_CAST op0=6 op1=11 op2=2/>
-; PF1-NEXT: <INST_CAST op0=9 op1=12 op2=5/>
-; PF1-NEXT: <INST_CAST op0=8 op1=12 op2=5/>
-; PF1-NEXT: <INST_CAST op0=13 op1=12 op2=6/>
-; PF1-NEXT: <INST_CAST op0=10 op1=12 op2=6/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
+; PF1-NEXT: <INST_CAST op0=6 op1={{.*}} op2=0/>
+; PF1-NEXT: <INST_CAST op0=2 op1={{.*}} op2=0/>
+; PF1-NEXT: <INST_CAST op0=8 op1={{.*}} op2=1/>
+; PF1-NEXT: <INST_CAST op0=4 op1={{.*}} op2=1/>
+; PF1-NEXT: <INST_CAST op0=9 op1={{.*}} op2=2/>
+; PF1-NEXT: <INST_CAST op0=6 op1={{.*}} op2=2/>
+; PF1-NEXT: <INST_CAST op0=9 op1={{.*}} op2=5/>
+; PF1-NEXT: <INST_CAST op0=8 op1={{.*}} op2=5/>
+; PF1-NEXT: <INST_CAST op0=13 op1={{.*}} op2=6/>
+; PF1-NEXT: <INST_CAST op0=10 op1={{.*}} op2=6/>
; PF1-NEXT: <INST_RET/>
; PF1-NEXT: </FUNCTION_BLOCK>
@@ -668,16 +668,16 @@ define void @TestCasts() {
; PF2: <FUNCTION_BLOCK>
; PF2: </CONSTANTS_BLOCK>
; PF2-NEXT: <INST_ALLOCA op0=2 op1=4/>
-; PF2-NEXT: <INST_CAST op0=5 op1=2 op2=0/>
-; PF2-NEXT: <INST_CAST op0=2 op1=2 op2=0/>
-; PF2-NEXT: <INST_CAST op0=7 op1=11 op2=1/>
-; PF2-NEXT: <INST_CAST op0=4 op1=11 op2=1/>
-; PF2-NEXT: <INST_CAST op0=8 op1=11 op2=2/>
-; PF2-NEXT: <INST_CAST op0=6 op1=11 op2=2/>
-; PF2-NEXT: <INST_CAST op0=8 op1=12 op2=5/>
-; PF2-NEXT: <INST_CAST op0=8 op1=12 op2=5/>
-; PF2-NEXT: <INST_CAST op0=12 op1=12 op2=6/>
-; PF2-NEXT: <INST_CAST op0=10 op1=12 op2=6/>
+; PF2-NEXT: <INST_CAST op0=5 op1={{.*}} op2=0/>
+; PF2-NEXT: <INST_CAST op0=2 op1={{.*}} op2=0/>
+; PF2-NEXT: <INST_CAST op0=7 op1={{.*}} op2=1/>
+; PF2-NEXT: <INST_CAST op0=4 op1={{.*}} op2=1/>
+; PF2-NEXT: <INST_CAST op0=8 op1={{.*}} op2=2/>
+; PF2-NEXT: <INST_CAST op0=6 op1={{.*}} op2=2/>
+; PF2-NEXT: <INST_CAST op0=8 op1={{.*}} op2=5/>
+; PF2-NEXT: <INST_CAST op0=8 op1={{.*}} op2=5/>
+; PF2-NEXT: <INST_CAST op0=12 op1={{.*}} op2=6/>
+; PF2-NEXT: <INST_CAST op0=10 op1={{.*}} op2=6/>
; PF2-NEXT: <INST_RET/>
; PF2-NEXT: </FUNCTION_BLOCK>
@@ -703,7 +703,7 @@ define void @TestSavedPtrToInt() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=2 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BINOP op0=1 op1=3 op2=0/>
; PF1-NEXT: <INST_CALL op0=0 op1=26 op2=2/>
; PF1-NEXT: <INST_RET/>
@@ -755,8 +755,8 @@ define void @CastIcmp() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
-; PF1-NEXT: <INST_CAST op0=6 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
+; PF1-NEXT: <INST_CAST op0=6 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_CMP2 op0=6 op1=5 op2=32/>
; PF1-NEXT: <INST_CMP2 op0=3 op1=6 op2=32/>
; PF1-NEXT: <INST_CMP2 op0=8 op1=3 op2=32/>
@@ -818,8 +818,8 @@ define void @CastSelect() {
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=2 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
-; PF1-NEXT: <INST_CAST op0=7 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
+; PF1-NEXT: <INST_CAST op0=7 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_VSELECT op0=7 op1=6 op2=4/>
; PF1-NEXT: <INST_VSELECT op0=3 op1=7 op2=5/>
; PF1-NEXT: <INST_VSELECT op0=9 op1=3 op2=6/>
@@ -897,9 +897,9 @@ merge:
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=4 op2=11/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=11/>
; PF1-NEXT: <INST_ALLOCA op0=3 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BR op0=1 op1=2 op2=6/>
; PF1-NEXT: <INST_LOAD op0=3 op1=0 op2=0/>
; PF1-NEXT: <INST_BR op0=3/>
@@ -1007,9 +1007,9 @@ start:
; PF1-NEXT: <INST_LOAD op0=4294967294 op1=0 op2=0/>
; PF1-NEXT: <INST_BR op0=1/>
; PF1-NEXT: <INST_ALLOCA op0=5 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=4 op2=11/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=11/>
; PF1-NEXT: <INST_ALLOCA op0=7 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BR op0=2 op1=3 op2=10/>
; PF1: </FUNCTION_BLOCK>
@@ -1105,12 +1105,12 @@ merge:
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=4 op2=11/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=11/>
; PF1-NEXT: <INST_ALLOCA op0=3 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BR op0=1 op1=2 op2=6/>
; PF1-NEXT: <INST_LOAD op0=3 op1=0 op2=0/>
-; PF1-NEXT: <INST_CAST op0=3 op1=0 op2=9/>
+; PF1-NEXT: <INST_CAST op0=3 op1={{.*}} op2=9/>
; PF1-NEXT: <INST_BINOP op0=2 op1=1 op2=0/>
; PF1-NEXT: <INST_BR op0=3/>
; PF1-NEXT: <INST_LOAD op0=6 op1=0 op2=0/>
@@ -1223,8 +1223,8 @@ b4:
; PF1: <FUNCTION_BLOCK>
; PF1: </CONSTANTS_BLOCK>
; PF1-NEXT: <INST_ALLOCA op0=1 op1=4/>
-; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/>
-; PF1-NEXT: <INST_CAST op0=5 op1=4 op2=11/>
+; PF1-NEXT: <INST_CAST op0=1 op1={{.*}} op2=9/>
+; PF1-NEXT: <INST_CAST op0=5 op1={{.*}} op2=11/>
; PF1-NEXT: <INST_BR op0=1 op1=2 op2=5/>
; PF1-NEXT: <INST_BR op0=3 op1=4 op2=5/>
; PF1-NEXT: <INST_BR op0=5 op1=6 op2=5/>
diff --git a/test/NaCl/Bitcode/switch.ll b/test/NaCl/Bitcode/switch.ll
index 9da6667bed..f15001f504 100644
--- a/test/NaCl/Bitcode/switch.ll
+++ b/test/NaCl/Bitcode/switch.ll
@@ -48,11 +48,10 @@ end:
}
; CHECK: <TYPE_BLOCK_ID>
-; CHECK-NEXT: <NUMENTRY op0=5/>
+; CHECK-NEXT: <NUMENTRY op0=4/>
; CHECK-NEXT: <VOID/>
-; CHECK-NEXT: <LABEL/>
; CHECK-NEXT: <INTEGER op0=32/>
-; CHECK-NEXT: <FUNCTION op0=0 op1=0 op2=2/>
-; CHECK-NEXT: <POINTER op0=3 op1=0/>
+; CHECK-NEXT: <FUNCTION op0={{.*}} op1={{.*}} op2={{.*}}/>
+; CHECK-NEXT: <POINTER op0={{.*}} op1={{.*}}/>
; CHECK-NEXT: </TYPE_BLOCK_ID>