aboutsummaryrefslogtreecommitdiff
path: root/tests/cases
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-03 15:16:17 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-03 15:16:17 -0800
commit8478d6aee54d6c52de16d8c58309534afbf5bf9e (patch)
treebec73fd8e0cd6888d2dfb6b9e6a1423cc2432f61 /tests/cases
parent1a007b1631509b9d72499a8f4402294017ee04dc (diff)
parenta8e26049c1a72fa6b19dac45fa2b44616f94241a (diff)
Merge branch 'incoming'
Diffstat (limited to 'tests/cases')
-rw-r--r--tests/cases/514_ta2.ll4
-rw-r--r--tests/cases/aliasbitcast.ll12
-rw-r--r--tests/cases/atomicrmw.ll8
-rw-r--r--tests/cases/atomicrmw_unaligned.ll8
-rw-r--r--tests/cases/breakinthemiddle.ll11
-rw-r--r--tests/cases/breakinthemiddle2.ll17
-rw-r--r--tests/cases/breakinthemiddle3.ll11
-rw-r--r--tests/cases/caall.ll12
-rw-r--r--tests/cases/complexphi.ll6
-rw-r--r--tests/cases/dash.ll8
-rw-r--r--tests/cases/emptyalloca.ll31
-rw-r--r--tests/cases/emptyasm_le32.ll5
-rw-r--r--tests/cases/entry3.ll14
-rw-r--r--tests/cases/funcptr.ll8
-rw-r--r--tests/cases/i24_mem_ta2.ll10
-rw-r--r--tests/cases/i64toi8star.ll6
-rw-r--r--tests/cases/inttoptr.ll8
-rw-r--r--tests/cases/invokebitcast.ll7
-rw-r--r--tests/cases/invokeundef.ll9
-rw-r--r--tests/cases/legalizer_ta2.ll4
-rw-r--r--tests/cases/loadbitcastgep.ll7
-rw-r--r--tests/cases/longjmp_tiny_invoke_phi.ll46
-rw-r--r--tests/cases/longjmp_tiny_invoke_phi.txt4
-rw-r--r--tests/cases/oob_ta2.ll4
-rw-r--r--tests/cases/phi24_ta2.ll7
-rw-r--r--tests/cases/phicubed.ll2
-rw-r--r--tests/cases/phientryimplicit.ll36
-rw-r--r--tests/cases/phientryimplicitmix.ll22
-rw-r--r--tests/cases/phientryimplicitmoar.ll14
-rw-r--r--tests/cases/phiself.ll4
-rw-r--r--tests/cases/ptrtoi64.ll14
-rw-r--r--tests/cases/selectstruct.ll4
-rw-r--r--tests/cases/sillybitcast.ll4
-rw-r--r--tests/cases/sillybitcast2.ll35
-rw-r--r--tests/cases/sillyfuncast.ll6
-rw-r--r--tests/cases/storebigfloat.ll2
-rw-r--r--tests/cases/storestruct.ll10
-rw-r--r--tests/cases/structphiparam.ll4
-rw-r--r--tests/cases/sub_11_0.ll2
-rw-r--r--tests/cases/switch64_ta2.ll13
-rw-r--r--tests/cases/uadd_overflow_ta2.ll22
-rw-r--r--tests/cases/unaligneddouble.ll2
-rw-r--r--tests/cases/zeroembedded.ll4
-rw-r--r--tests/cases/zeroextarg.ll6
44 files changed, 308 insertions, 165 deletions
diff --git a/tests/cases/514_ta2.ll b/tests/cases/514_ta2.ll
index ae60191c..ab363242 100644
--- a/tests/cases/514_ta2.ll
+++ b/tests/cases/514_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpxFUbAg/test_emcc1.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
%struct.c_s = type { i8, float, i32 }
diff --git a/tests/cases/aliasbitcast.ll b/tests/cases/aliasbitcast.ll
index 70dc64ef..5e5f13aa 100644
--- a/tests/cases/aliasbitcast.ll
+++ b/tests/cases/aliasbitcast.ll
@@ -1,15 +1,15 @@
; ModuleID = '/tmp/emscripten/tmp/src.cpp.o'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1]
-@_ZN16FormWidgetChoiceD2Ev = alias bitcast (i32 678 to i8*) ; [#uses=1]
+@_ZN16FormWidgetChoiceD2Ev = alias i8* inttoptr (i32 678 to i8*) ; [#uses=1]
; [#uses=2]
-define void @"\01_Z5hellov"() {
+define void @"_Z5hellov"() {
entry:
- %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %0 = call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
br label %return
return: ; preds = %entry
@@ -25,7 +25,7 @@ entry:
%retval = alloca i32 ; [#uses=2]
%0 = alloca i32 ; [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- call void @"\01_Z5hellov"()
+ call void @"_Z5hellov"()
store i32 0, i32* %0, align 4
%1 = load i32* %0, align 4 ; [#uses=1]
store i32 %1, i32* %retval, align 4
diff --git a/tests/cases/atomicrmw.ll b/tests/cases/atomicrmw.ll
index fe479dce..31529250 100644
--- a/tests/cases/atomicrmw.ll
+++ b/tests/cases/atomicrmw.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
@@ -10,10 +10,10 @@ entry:
%t = alloca i32, align 4 ; [#uses=2 type=i32**]
store i32 50, i32* %t, align 4
%0 = load i32* %t
- %1 = atomicrmw add i32* %t, i32 3 seq_cst, ; [#uses=0 type=i32] [debug line = 21:12]
+ %1 = atomicrmw add i32* %t, i32 3 seq_cst ; [#uses=0 type=i32] [debug line = 21:12]
%2 = load i32* %t
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i32 %0, i32 %2) ; [#uses=0 type=i32]
- %3 = atomicrmw volatile add i32* %t, i32 3 seq_cst, ; [#uses=0 type=i32] [debug line = 21:12]
+ %3 = atomicrmw volatile add i32* %t, i32 3 seq_cst ; [#uses=0 type=i32] [debug line = 21:12]
ret i32 1
}
diff --git a/tests/cases/atomicrmw_unaligned.ll b/tests/cases/atomicrmw_unaligned.ll
index fe479dce..31529250 100644
--- a/tests/cases/atomicrmw_unaligned.ll
+++ b/tests/cases/atomicrmw_unaligned.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
@@ -10,10 +10,10 @@ entry:
%t = alloca i32, align 4 ; [#uses=2 type=i32**]
store i32 50, i32* %t, align 4
%0 = load i32* %t
- %1 = atomicrmw add i32* %t, i32 3 seq_cst, ; [#uses=0 type=i32] [debug line = 21:12]
+ %1 = atomicrmw add i32* %t, i32 3 seq_cst ; [#uses=0 type=i32] [debug line = 21:12]
%2 = load i32* %t
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i32 %0, i32 %2) ; [#uses=0 type=i32]
- %3 = atomicrmw volatile add i32* %t, i32 3 seq_cst, ; [#uses=0 type=i32] [debug line = 21:12]
+ %3 = atomicrmw volatile add i32* %t, i32 3 seq_cst ; [#uses=0 type=i32] [debug line = 21:12]
ret i32 1
}
diff --git a/tests/cases/breakinthemiddle.ll b/tests/cases/breakinthemiddle.ll
index 769b0e11..6e05b853 100644
--- a/tests/cases/breakinthemiddle.ll
+++ b/tests/cases/breakinthemiddle.ll
@@ -1,8 +1,11 @@
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
@.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1]
-define linkonce_odr i32* @main() align 2 {
- %199 = trunc i8 1 to i1 ; [#uses=1]
- br i1 %199, label %label555, label %label569
+define linkonce_odr i32 @main() align 2 {
+ %1 = trunc i8 1 to i1 ; [#uses=1]
+ br i1 %1, label %label555, label %label569
label555: ; preds = %353
br label %label569
@@ -10,7 +13,7 @@ label555: ; preds = %353
br label %label569
label569: ; preds = %555
- %333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
ret i32 0
}
diff --git a/tests/cases/breakinthemiddle2.ll b/tests/cases/breakinthemiddle2.ll
index 318b49dc..ba96654f 100644
--- a/tests/cases/breakinthemiddle2.ll
+++ b/tests/cases/breakinthemiddle2.ll
@@ -1,21 +1,24 @@
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
@.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1]
define linkonce_odr i32 @main() align 2 {
- %333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
- %199 = trunc i8 1 to i1 ; [#uses=1]
- br i1 %199, label %label555, label %label569
+ %a333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %b199 = trunc i8 1 to i1 ; [#uses=1]
+ br i1 %b199, label %label555, label %label569
label555: ; preds = %0
br label %label569 ; branch should ignore all code after it in the block
; No predecessors!
- %a472 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ %aa472 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
cleanup
- %a473 = extractvalue { i8*, i32 } %a472, 0
- %a474 = extractvalue { i8*, i32 } %a472, 1
+ %aa473 = extractvalue { i8*, i32 } %aa472, 0
+ %aa474 = extractvalue { i8*, i32 } %aa472, 1
br label %label569
label569: ; preds = %0
- br i1 %199, label %label990, label %label999
+ br i1 %b199, label %label990, label %label999
label990:
ret i32 0 ; ret should ignore all code after it in the block
diff --git a/tests/cases/breakinthemiddle3.ll b/tests/cases/breakinthemiddle3.ll
index e9173965..38da15ef 100644
--- a/tests/cases/breakinthemiddle3.ll
+++ b/tests/cases/breakinthemiddle3.ll
@@ -1,9 +1,12 @@
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
@.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1]
define linkonce_odr i32 @main() align 2 {
- %333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
- %199 = trunc i8 1 to i1 ; [#uses=1]
- switch i32 %333, label %label999 [
+ %a333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %z199 = trunc i8 1 to i1 ; [#uses=1]
+ switch i32 %a333, label %label999 [
i32 1000, label %label995
] ; switch should ignore all code after it in the block
; No predecessors!
@@ -14,7 +17,7 @@ define linkonce_odr i32 @main() align 2 {
br label %label999
label995:
- %333b = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %b333b = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
br label %label999
label999: ; preds = %555
diff --git a/tests/cases/caall.ll b/tests/cases/caall.ll
index 5b8f7f29..2cc231ec 100644
--- a/tests/cases/caall.ll
+++ b/tests/cases/caall.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
@@ -11,14 +11,14 @@ entry:
store i32 0, i32* %retval
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0 type=i32]
%call12 = call void (i32*)** @_ZNSt3__13mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPFvP6ObjectENS_4lessIS6_EENS4_INS_4pairIKS6_SA_EEEEEixERSE_(i32 10)
- %26 = load void (%class.Object*)** %call12
+ %l26 = load void (i32*)** %call12
ret i32 1
}
-define (i32*)** @_ZNSt3__13mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPFvP6ObjectENS_4lessIS6_EENS4_INS_4pairIKS6_SA_EEEEEixERSE_(i32 %x) {
+define void (i32*)** @_ZNSt3__13mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPFvP6ObjectENS_4lessIS6_EENS4_INS_4pairIKS6_SA_EEEEEixERSE_(i32 %x) {
entry:
- %ret = inttoptr i32 0 to (i32*)**
- ret (i32*)** %ret
+ %ret = inttoptr i32 0 to void (i32*)**
+ ret void (i32*)** %ret
}
; [#uses=1]
diff --git a/tests/cases/complexphi.ll b/tests/cases/complexphi.ll
index fcb7185f..e79e6f1b 100644
--- a/tests/cases/complexphi.ll
+++ b/tests/cases/complexphi.ll
@@ -1,6 +1,6 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
@_dispatchTable = internal global i64 0
@@ -21,8 +21,6 @@ cond.end: ; preds = %cond.false, %cond.t
%cond = phi { i32, i32 } [ { i32 5, i32 6 }, %entry ], [ zeroinitializer, %cond.null ] ; [#uses=1]
store { i32, i32 } %cond, { i32, i32 }* %comp
- store { i32, i32 } { i32 ptrtoint (i64* @_dispatchTable to i32), i32 0 }, { i32, i32 }* getelementptr inbounds ([1 x i64]* @_dispatchTable, i32 0, i32 0, i32 1), align 4
-
ret i32 0 ; [debug line = 6:13]
}
diff --git a/tests/cases/dash.ll b/tests/cases/dash.ll
index ed5b01ae..6833a42e 100644
--- a/tests/cases/dash.ll
+++ b/tests/cases/dash.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpqfApGD/a.out.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@other-name = alias i32 ()* @main
@@ -10,9 +10,9 @@ define i32 @main() {
entry:
%ret-val = alloca i32, align 4
store i32 0, i32* %ret-val
- %aaa = bitcast i32 ()* @other-name to i32
+ %aaa = ptrtoint i32 ()* @other-name to i32
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.st-r, i32 0, i32 0), i32 %aaa)
- ret i32 %ret-val
+ ret i32 0
}
declare i32 @printf(i8*, ...)
diff --git a/tests/cases/emptyalloca.ll b/tests/cases/emptyalloca.ll
new file mode 100644
index 00000000..f12a4161
--- /dev/null
+++ b/tests/cases/emptyalloca.ll
@@ -0,0 +1,31 @@
+; ModuleID = '/tmp/tmpjSNiky/a.out.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
+@.str = private unnamed_addr constant [30 x i8] c"Module.print('hello, world!')\00", align 1
+
+; Function Attrs: nounwind
+define internal void @_Z9doNothingPi(i32* %arr) #0 {
+ %1 = alloca i32*, align 4
+ store i32* %arr, i32** %1, align 4
+ ret void
+}
+
+define i32 @main() #1 {
+ %arr = alloca [0 x i32], align 4
+ %1 = bitcast [0 x i32]* %arr to i8*
+ call void @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 0, i32 4, i1 false)
+ %2 = getelementptr inbounds [0 x i32]* %arr, i32 0, i32 0
+ call void @_Z9doNothingPi(i32* %2)
+ call void @emscripten_asm_const(i8* getelementptr inbounds ([30 x i8]* @.str, i32 0, i32 0))
+ ret i32 0
+}
+
+; Function Attrs: nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) #2
+
+declare void @emscripten_asm_const(i8*) #1
+
+attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #2 = { nounwind }
diff --git a/tests/cases/emptyasm_le32.ll b/tests/cases/emptyasm_le32.ll
index e123d3d5..8f6b606e 100644
--- a/tests/cases/emptyasm_le32.ll
+++ b/tests/cases/emptyasm_le32.ll
@@ -1,3 +1,6 @@
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
; ModuleID = 'tests/hello_world.bc'
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
@@ -7,7 +10,7 @@ define i32 @main() {
entry:
%retval = alloca i32, align 4 ; [#uses=1 type=i32*]
store i32 0, i32* %retval
- call void asm sideeffect "", "~{memory}"() nounwind, !srcloc !0
+ call void asm sideeffect "", "~{memory}"() nounwind
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0 type=i32]
ret i32 1
}
diff --git a/tests/cases/entry3.ll b/tests/cases/entry3.ll
index a20c6843..6888d0a8 100644
--- a/tests/cases/entry3.ll
+++ b/tests/cases/entry3.ll
@@ -1,25 +1,25 @@
; ModuleID = '/tmp/tmpKnA2D3/a.out.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@.str = private unnamed_addr constant [11 x i8] c"getgid=%d\0A\00", align 1
@.str1 = private unnamed_addr constant [6 x i8] c"f=%d\0A\00", align 1
define internal i32 @_Z1fii(i32, i32) noinline {
entry:
- %3 = tail call i32 @getgid()
- %4 = icmp eq i32 %3, 0
- br i1 %4, label %cond.b, label %cond.a
+ %a3 = tail call i32 @getgid()
+ %a4 = icmp eq i32 %a3, 0
+ br i1 %a4, label %cond.b, label %cond.a
cond.a:
- %6 = tail call i32 @getgid()
+ %a6 = tail call i32 @getgid()
br label %cond.end
cond.b:
br label %cond.end
cond.end:
- %.0 = phi i32 [ 0, %cond.b ], [ 1, %1 ]
+ %.0 = phi i32 [ 0, %cond.b ], [ 1, %cond.a ]
ret i32 %.0
}
diff --git a/tests/cases/funcptr.ll b/tests/cases/funcptr.ll
index 0aa03fcf..ef869c33 100644
--- a/tests/cases/funcptr.ll
+++ b/tests/cases/funcptr.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@.str = private unnamed_addr constant [17 x i8] c"hello %d world!\0A\00", align 1 ; [#uses=1 type=[17 x i8]*]
@@ -9,7 +9,7 @@ define i32 @main() {
entry:
%retval = alloca i32, align 4 ; [#uses=1 type=i32*]
store i32 0, i32* %retval
- %access_virt_barray = bitcast i32 100 to [64 x i16]* (i32*, i32)**
+ %access_virt_barray = inttoptr i32 100 to [64 x i16]* (i32*, i32)**
store [64 x i16]* (i32*, i32)* @access_virt_barray, [64 x i16]* (i32*, i32)** %access_virt_barray, align 4
%wakaptr = bitcast [64 x i16]* (i32*, i32)** %access_virt_barray to i32*
%waka = load i32* %wakaptr
@@ -20,7 +20,7 @@ entry:
}
define [64 x i16]* @access_virt_barray(i32*, i32) {
- ret void
+ ret [64 x i16]* inttoptr (i32 0 to [64 x i16]*)
}
; [#uses=1]
diff --git a/tests/cases/i24_mem_ta2.ll b/tests/cases/i24_mem_ta2.ll
index e50014ca..550389fe 100644
--- a/tests/cases/i24_mem_ta2.ll
+++ b/tests/cases/i24_mem_ta2.ll
@@ -1,8 +1,8 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
-@.str = private unnamed_addr constant [15 x i8] c".%x.\0A\00", align 1 ; [#uses=1 type=[5 x i8]*]
+@.str = private unnamed_addr constant [6 x i8] c".%x.\0A\00", align 1 ; [#uses=1 type=[5 x i8]*]
define i32 @main() {
entry:
@@ -11,11 +11,11 @@ entry:
%i24 = bitcast i32* %mem to i24*
%load = load i24* %i24, align 4
%load32 = zext i24 %load to i32
- %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([5 x i8]* @.str, i32 0, i32 0), i32 %load32)
+ %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i32 %load32)
%val_24 = trunc i32 4041265344 to i24
store i24 %val_24, i24* %i24, align 4
%load32b = load i32* %mem, align 4
- %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([5 x i8]* @.str, i32 0, i32 0), i32 %load32b)
+ %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i32 %load32b)
ret i32 1
}
diff --git a/tests/cases/i64toi8star.ll b/tests/cases/i64toi8star.ll
index d4a39340..b2307449 100644
--- a/tests/cases/i64toi8star.ll
+++ b/tests/cases/i64toi8star.ll
@@ -25,8 +25,8 @@ entry:
%retval = alloca i32 ; [#uses=2]
%0 = alloca i32 ; [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- %5 = call i32 @PyLong_FromVoidPtr(i8* null) nounwind ; [#uses=0]
- %13 = call i32 @PyLong_FromVoidPtr(i8* inttoptr (i64 1 to i8*)) nounwind ; [#uses=0]
- %1 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %a5 = call i32 @PyLong_FromVoidPtr(i8* null) nounwind ; [#uses=0]
+ %a13 = call i32 @PyLong_FromVoidPtr(i8* inttoptr (i64 1 to i8*)) nounwind ; [#uses=0]
+ %a1 = call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
ret i32 0
}
diff --git a/tests/cases/inttoptr.ll b/tests/cases/inttoptr.ll
index b0711672..c1b40a74 100644
--- a/tests/cases/inttoptr.ll
+++ b/tests/cases/inttoptr.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/emscripten/tmp/src.cpp.o'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
@.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1]
@@ -14,7 +14,7 @@ entry:
%0 = alloca i32 ; [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
%sz.i7 = inttoptr i32 64 to i32* ; [#uses=1 type=i32*]
- store i32 184, i32* %sz.i7, align 8, !tbaa !1610
- %1 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ store i32 184, i32* %sz.i7, align 8
+ %1 = call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
ret i32 0
}
diff --git a/tests/cases/invokebitcast.ll b/tests/cases/invokebitcast.ll
index ffb5803f..ec090b0d 100644
--- a/tests/cases/invokebitcast.ll
+++ b/tests/cases/invokebitcast.ll
@@ -1,7 +1,7 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
; Just test for compilation here
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-f128:128:128-n8:16:32"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
%struct.CPU_Regs = type { [8 x %union.GenReg32] }
%union.GenReg32 = type { [1 x i32] }
@@ -16,7 +16,8 @@ entry:
%0 = alloca i32 ; [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
%1 = load i32* bitcast (i32* getelementptr inbounds (%struct.CPU_Regs* @cpu_regs, i32 0, i32 0, i32 1, i32 0, i32 0) to i32*), align 2 ; [#uses=1]
- store i16 %1, i16* bitcast (%struct.CPU_Regs* @cpu_regs to i16*), align 2
+ %s = trunc i32 %1 to i16
+ store i16 %s, i16* bitcast (%struct.CPU_Regs* @cpu_regs to i16*), align 2
%2 = call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
store i32 0, i32* %0, align 4
%3 = load i32* %0, align 4 ; [#uses=1]
diff --git a/tests/cases/invokeundef.ll b/tests/cases/invokeundef.ll
index 9dc1f93d..be1dd671 100644
--- a/tests/cases/invokeundef.ll
+++ b/tests/cases/invokeundef.ll
@@ -1,7 +1,7 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
; Just test for compilation here
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-f128:128:128-n8:16:32"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
%struct.CPU_Regs = type { [8 x %union.GenReg32] }
%union.GenReg32 = type { [1 x i32] }
@@ -16,14 +16,15 @@ entry:
%0 = alloca i32 ; [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
%1 = load i32* bitcast (i32* getelementptr inbounds (%struct.CPU_Regs* @cpu_regs, i32 0, i32 0, i32 1, i32 0, i32 0) to i32*), align 2 ; [#uses=1]
- store i16 %1, i16* bitcast (%struct.CPU_Regs* @cpu_regs to i16*), align 2
+ %a1 = trunc i32 %1 to i16
+ store i16 %a1, i16* bitcast (%struct.CPU_Regs* @cpu_regs to i16*), align 2
%2 = call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
store i32 0, i32* %0, align 4
%3 = load i32* %0, align 4 ; [#uses=1]
store i32 %3, i32* %retval, align 4
br label %return
- invoke void undef(%struct.CPU_Regs* noalias @cpu_regs, i32 %99)
+ invoke vo