diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-13 16:59:06 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-13 16:59:06 -0800 |
commit | 4edb942c56a188e38c927deafd974bace0b54a5d (patch) | |
tree | 5a65b207a92d7fbd5961d210b4de89da1aa0d11c /tests/cases | |
parent | 1d27ea201d2298ea9b6ca16d005e9a3e81661e8e (diff) |
various fixes for test_cases for fastcomp
Diffstat (limited to 'tests/cases')
-rw-r--r-- | tests/cases/aliasbitcast.ll | 12 | ||||
-rw-r--r-- | tests/cases/atomicrmw.ll | 8 | ||||
-rw-r--r-- | tests/cases/atomicrmw_unaligned.ll | 8 | ||||
-rw-r--r-- | tests/cases/breakinthemiddle.ll | 11 | ||||
-rw-r--r-- | tests/cases/dash.ll | 8 | ||||
-rw-r--r-- | tests/cases/loadbitcastgep.ll | 7 | ||||
-rw-r--r-- | tests/cases/phientryimplicitmoar.ll | 14 | ||||
-rw-r--r-- | tests/cases/selectstruct.ll | 4 | ||||
-rw-r--r-- | tests/cases/storebigfloat.ll | 2 | ||||
-rw-r--r-- | tests/cases/structphiparam.ll | 4 | ||||
-rw-r--r-- | tests/cases/uadd_overflow_ta2.ll | 22 | ||||
-rw-r--r-- | tests/cases/zeroextarg.ll | 6 |
12 files changed, 57 insertions, 49 deletions
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/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/loadbitcastgep.ll b/tests/cases/loadbitcastgep.ll index 2a90dbb7..cfb88a0d 100644 --- a/tests/cases/loadbitcastgep.ll +++ b/tests/cases/loadbitcastgep.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-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] } @@ -15,7 +15,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 + %b = trunc i32 %1 to i16 + store i16 %b, 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/phientryimplicitmoar.ll b/tests/cases/phientryimplicitmoar.ll index c83458e6..0f07cc44 100644 --- a/tests/cases/phientryimplicitmoar.ll +++ b/tests/cases/phientryimplicitmoar.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]*] @.str2 = private unnamed_addr constant [15 x i8] c"hello!!world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @@ -9,16 +9,16 @@ define i32 @main() { %retval = alloca i32, align 4 %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str2, i32 0, i32 0)) %a12 = zext i1 1 to i32 - br label %13 + br label %L13 -; <label>:13 ; preds = %13, %1 - %a14 = phi i32 [ %a12, %1 ], [ %a15, %13 ] +L13: + %a14 = phi i32 [ %a12, %0 ], [ %a15, %L13 ] %call0 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) %a15 = add nsw i32 %a14, 2 %a16 = icmp eq i32 %a15, 9 - br i1 %a16, label %17, label %13 + br i1 %a16, label %L17, label %L13 -; <label>:17 ; preds = %1 +L17: %call1 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str2, i32 0, i32 0)) ret i32 1 } diff --git a/tests/cases/selectstruct.ll b/tests/cases/selectstruct.ll index 5c9fecf7..58b1848e 100644 --- a/tests/cases/selectstruct.ll +++ b/tests/cases/selectstruct.ll @@ -8,7 +8,9 @@ target triple = "i386-pc-linux-gnu" define i32 @main() { entry: %retval = alloca i32, align 4 ; [#uses=1 type=i32*] - %. = select i1 %retval, { i32, i32 } { i32 55, i32 99 }, { i32, i32 } { i32 2, i32 6 } ; [#uses=1 type={ i32, i32 }] + %check = ptrtoint i32* %retval to i32 + %check1 = trunc i32 %check to i1 + %. = select i1 %check1, { i32, i32 } { i32 55, i32 99 }, { i32, i32 } { i32 2, i32 6 } ; [#uses=1 type={ i32, i32 }] store i32 0, i32* %retval %.1 = extractvalue { i32, i32 } %., 0 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i32 %.1) ; [#uses=0 type=i32] diff --git a/tests/cases/storebigfloat.ll b/tests/cases/storebigfloat.ll index c9995835..b940f5ca 100644 --- a/tests/cases/storebigfloat.ll +++ b/tests/cases/storebigfloat.ll @@ -1,3 +1,5 @@ +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]*] diff --git a/tests/cases/structphiparam.ll b/tests/cases/structphiparam.ll index 117bdf77..fadf4d29 100644 --- a/tests/cases/structphiparam.ll +++ b/tests/cases/structphiparam.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, %d %d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @_dispatchTable = internal global i64 0 diff --git a/tests/cases/uadd_overflow_ta2.ll b/tests/cases/uadd_overflow_ta2.ll index feac60e3..e827cb38 100644 --- a/tests/cases/uadd_overflow_ta2.ll +++ b/tests/cases/uadd_overflow_ta2.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" @.str2 = private constant [9 x i8] c"*%d,%d*\0A\00", align 1 ; [#uses=1] @@ -24,14 +24,14 @@ entry: %ba2 = zext i1 %ba1 to i32 call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str2, i32 0, i32 0), i32 %ba0, i32 %ba2) ; [#uses=0] - %64buadd1pre = tail call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 5000, i64 3000) - %64buadd1 = insertvalue { i64, i1 } %64buadd1pre, i64 9875, 0 - %64buadd2 = insertvalue { i64, i1 } %64buadd1, i1 1, 1 - %64ba0pre = extractvalue { i64, i1 } %64buadd2, 0 - %64ba0 = trunc i64 %64ba0pre to i32 - %64ba1 = extractvalue { i64, i1 } %64buadd2, 1 - %64ba2 = zext i1 %64ba1 to i32 - call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str2, i32 0, i32 0), i32 %64ba0, i32 %64ba2) ; [#uses=0] + %z64buadd1pre = tail call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 5000, i64 3000) + %z64buadd1 = insertvalue { i64, i1 } %z64buadd1pre, i64 9875, 0 + %z64buadd2 = insertvalue { i64, i1 } %z64buadd1, i1 1, 1 + %z64ba0pre = extractvalue { i64, i1 } %z64buadd2, 0 + %z64ba0 = trunc i64 %z64ba0pre to i32 + %z64ba1 = extractvalue { i64, i1 } %z64buadd2, 1 + %z64ba2 = zext i1 %z64ba1 to i32 + call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str2, i32 0, i32 0), i32 %z64ba0, i32 %z64ba2) ; [#uses=0] %zbuadd1 = insertvalue { i32, i1 } { i32 undef, i1 false }, i32 10, 0 ; undef and explicit %zba0 = extractvalue { i32, i1 } %zbuadd1, 0 @@ -46,5 +46,5 @@ entry: declare i32 @printf(i8*, ...) declare { i32, i1 } @llvm.uadd.with.overflow.i32(i32, i32) nounwind readnone -declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i32) nounwind readnone +declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) nounwind readnone diff --git a/tests/cases/zeroextarg.ll b/tests/cases/zeroextarg.ll index 25efb7ec..a3caa74c 100644 --- a/tests/cases/zeroextarg.ll +++ b/tests/cases/zeroextarg.ll @@ -1,10 +1,10 @@ ; 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]*] -define void @glSampleCoverage(float %18, i8 zeroext %invert) { +define void @glSampleCoverage(float %a18, i8 zeroext %invert) { entry: %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0 type=i32] ret void |