aboutsummaryrefslogtreecommitdiffstats
path: root/test/Feature
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-28 05:53:48 +0000
committerChris Lattner <sabre@nondot.org>2009-10-28 05:53:48 +0000
commit50b136dae90eb37f9fc9517a8638020db4f04f9c (patch)
tree7e4acfbdc99bf39c69c486baf43830265291edd1 /test/Feature
parent837e04a8bf13712a4a8ae279daab65a048b21f7d (diff)
downloadexternal_llvm-50b136dae90eb37f9fc9517a8638020db4f04f9c.zip
external_llvm-50b136dae90eb37f9fc9517a8638020db4f04f9c.tar.gz
external_llvm-50b136dae90eb37f9fc9517a8638020db4f04f9c.tar.bz2
add bitcode reader support for blockaddress. We can now fully
round trip blockaddress through .ll and .bc files, so add a testcase. There are still a bunch of places in the optimizer and other places that need to be updated to work with these constructs, but at least the basics are in now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature')
-rw-r--r--test/Feature/terminators.ll8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Feature/terminators.ll b/test/Feature/terminators.ll
index d3c68a7..1bca2a8 100644
--- a/test/Feature/terminators.ll
+++ b/test/Feature/terminators.ll
@@ -25,13 +25,19 @@ Case4: ; preds = %0
}
+@Addr = global i8* blockaddress(@indbrtest, %BB1)
+@Addr3 = global i8* blockaddress(@squared, %Case1)
+
define i32 @indbrtest(i8* %P, i32* %Q) {
indirectbr i8* %P, [label %BB1, label %BB2, label %BB3]
BB1:
indirectbr i32* %Q, []
BB2:
- indirectbr i32* %Q, [label %BB1, label %BB2]
+ %R = bitcast i8* blockaddress(@indbrtest, %BB3) to i8*
+ indirectbr i8* %R, [label %BB1, label %BB2, label %BB3]
BB3:
ret i32 2
}
+
+