diff --git a/tests/cases/ptrtoint_blockaddr.ll b/tests/cases/ptrtoint_blockaddr.ll index 68b29300603a7..6adc2c5b21c39 100644 --- a/tests/cases/ptrtoint_blockaddr.ll +++ b/tests/cases/ptrtoint_blockaddr.ll @@ -1,8 +1,12 @@ +; ModuleID = 'tests/hello_world.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 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 { + %a199 = trunc i8 1 to i1 ; [#uses=1] + br i1 %a199, label %label555, label %label569 label555: ; preds = %353 br label %label569 @@ -10,9 +14,9 @@ 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] + %a333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0] ; this should compile ok - store i32 ptrtoint (i8* blockaddress(@main, %label569) to i32), i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), align 8 + store i32 ptrtoint (i8* blockaddress(@main, %label569) to i32), i32* bitcast (i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0) to i32*), align 8 ret i32 0 } diff --git a/tests/test_core.py b/tests/test_core.py index 065bc5f5f7d5f..733407ffb4030 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -2080,8 +2080,6 @@ def test_bigswitch(self): ''', args=['34962', '26214', '35040']) def test_indirectbr(self): - if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp') - Building.COMPILER_TEST_OPTS = filter(lambda x: x != '-g', Building.COMPILER_TEST_OPTS) test_path = path_from_root('tests', 'core', 'test_indirectbr') @@ -2090,8 +2088,6 @@ def test_indirectbr(self): self.do_run_from_file(src, output) def test_indirectbr_many(self): - if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp') - if Settings.USE_TYPED_ARRAYS != 2: return self.skip('blockaddr > 255 requires ta2') test_path = path_from_root('tests', 'core', 'test_indirectbr_many') @@ -5133,7 +5129,7 @@ def test_cases(self): 'structparam', 'extendedprecision', 'issue_39', 'emptystruct', 'phinonexist', 'quotedlabel', 'oob_ta2', 'phientryimplicit', 'phiself', 'invokebitcast', 'funcptr', # invalid ir 'structphiparam', 'callwithstructural_ta2', 'callwithstructural64_ta2', 'structinparam', # pnacl limitations in ExpandStructRegs '2xi40', # pnacl limitations in ExpandGetElementPtr - 'indirectbrphi', 'ptrtoint_blockaddr', 'quoted', # current fastcomp limitations FIXME + 'quoted', # current fastcomp limitations FIXME 'sillyfuncast2', 'sillybitcast', 'atomicrmw_unaligned' # TODO XXX ]: continue if '_ta2' in shortname and not Settings.USE_TYPED_ARRAYS == 2: