diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-08-21 18:54:22 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-08-21 18:54:22 -0700 |
commit | 03df57a020ee1ffd6d506e1c7b3680880ab9b8d1 (patch) | |
tree | 88fc547546931d99339a2d77c2bba0c72b95c836 /tests/cases/ptrtoint_blockaddr.ll | |
parent | 9dea8e570a7ae316fc78e025b5ab32eda549c22e (diff) |
add missing blockaddr support
Diffstat (limited to 'tests/cases/ptrtoint_blockaddr.ll')
-rw-r--r-- | tests/cases/ptrtoint_blockaddr.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/cases/ptrtoint_blockaddr.ll b/tests/cases/ptrtoint_blockaddr.ll new file mode 100644 index 00000000..11e2f7bc --- /dev/null +++ b/tests/cases/ptrtoint_blockaddr.ll @@ -0,0 +1,20 @@ +@.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 %555, label %569 + +; <label>:555 ; preds = %353 + br label %569 + ; No predecessors! + br label %569 + +; <label>:569 ; preds = %555 + %333 = 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, %569) to i32), i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), align 8 + ret i32 0 +} + +declare i32 @printf(i8*) + |