diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-15 12:37:13 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-15 12:37:13 -0800 |
commit | 361070533da13ab13d927fa5f7d3773fd946cb4d (patch) | |
tree | ad25db7fc0139a3b897a3d6d3a57efc444bffd63 /tests | |
parent | f230ad634780a07c4321db467f54cdb793d755af (diff) |
tests/cases fixes for fastcomp
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cases/phicubed.ll | 2 | ||||
-rw-r--r-- | tests/cases/sillybitcast.ll | 4 | ||||
-rw-r--r-- | tests/cases/sillybitcast2.ll | 35 | ||||
-rw-r--r-- | tests/test_core.py | 2 |
4 files changed, 40 insertions, 3 deletions
diff --git a/tests/cases/phicubed.ll b/tests/cases/phicubed.ll index a0799997..5fc3208b 100644 --- a/tests/cases/phicubed.ll +++ b/tests/cases/phicubed.ll @@ -1,4 +1,6 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' +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.worker_args = type { i32, %struct.worker_args* } diff --git a/tests/cases/sillybitcast.ll b/tests/cases/sillybitcast.ll index c5ca4f9a..50a54da9 100644 --- a/tests/cases/sillybitcast.ll +++ b/tests/cases/sillybitcast.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] diff --git a/tests/cases/sillybitcast2.ll b/tests/cases/sillybitcast2.ll new file mode 100644 index 00000000..02cf8615 --- /dev/null +++ b/tests/cases/sillybitcast2.ll @@ -0,0 +1,35 @@ +; ModuleID = '/tmp/emscripten/tmp/src.cpp.o' +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] + +; [#uses=2] +define void @"_Z5hellov"() { +entry: + %0 = call i32 bitcast (i32 (i32*)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0] + br label %return + +return: ; preds = %entry + ret void +} + +; [#uses=1] +declare i32 @puts(i32*) + +; [#uses=0] +define i32 @main() { +entry: + %retval = alloca i32 ; [#uses=2] + %0 = alloca i32 ; [#uses=2] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + 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 + br label %return + +return: ; preds = %entry + %retval1 = load i32* %retval ; [#uses=1] + ret i32 %retval1 +} diff --git a/tests/test_core.py b/tests/test_core.py index 3398974b..4e1d2ce0 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -5018,7 +5018,7 @@ def process(filename): 'structphiparam', 'callwithstructural_ta2', 'callwithstructural64_ta2', # pnacl limitations in ExpandStructRegs 'legalizer_ta2', '514_ta2', # pnacl limitation in not legalizing i104, i96, etc. 'longjmp_tiny', 'longjmp_tiny_invoke', 'longjmp_tiny_phi', 'indirectbrphi', 'ptrtoint_blockaddr', 'quoted', # current fastcomp limitations FIXME - 'sillyfuncast', # TODO very very soon XXX + 'sillyfuncast', 'sillyfuncast2', 'sillybitcast', # TODO very very soon XXX ]: continue if '_ta2' in shortname and not Settings.USE_TYPED_ARRAYS == 2: print self.skip('case "%s" only relevant for ta2' % shortname) |