summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-22 23:15:57 +0000
committerChris Lattner <sabre@nondot.org>2010-03-22 23:15:57 +0000
commitea16ea59011ce6d5d9baaab16c33b1457ceab0da (patch)
tree6aeed6a88877c820f4385f6e92464134bd879ca7 /test/CodeGen/Generic
parent4a602caf2e973f4446f4eec366124077ce91d06d (diff)
downloadllvm-ea16ea59011ce6d5d9baaab16c33b1457ceab0da.tar.gz
llvm-ea16ea59011ce6d5d9baaab16c33b1457ceab0da.tar.bz2
llvm-ea16ea59011ce6d5d9baaab16c33b1457ceab0da.tar.xz
Fix PR6673: updating the callback should not clear the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r--test/CodeGen/Generic/addr-label.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/addr-label.ll b/test/CodeGen/Generic/addr-label.ll
index 51741110e0..0dbe5021bb 100644
--- a/test/CodeGen/Generic/addr-label.ll
+++ b/test/CodeGen/Generic/addr-label.ll
@@ -56,3 +56,26 @@ ret:
ret i32 -1
}
+
+; PR6673
+
+define i64 @test4a() {
+ %target = bitcast i8* blockaddress(@test4b, %usermain) to i8*
+ %ret = call i64 @test4b(i8* %target)
+
+ ret i64 %ret
+}
+
+define i64 @test4b(i8* %Code) {
+entry:
+ indirectbr i8* %Code, [label %usermain]
+usermain:
+ br label %label_line_0
+
+label_line_0:
+ br label %label_line_1
+
+label_line_1:
+ %target = ptrtoint i8* blockaddress(@test4b, %label_line_0) to i64
+ ret i64 %target
+}