diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-10-28 05:53:48 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-10-28 05:53:48 +0000 |
| commit | 5956dc87d3cb879194bd39f2c5ed5bd69405d015 (patch) | |
| tree | 5dbbd889ff2de32f72435f24ef4e7fe7fdfbe948 /llvm/test | |
| parent | f540d74b58539cfcb9b1ad1e340ba4c50d0fca2a (diff) | |
| download | bcm5719-llvm-5956dc87d3cb879194bd39f2c5ed5bd69405d015.tar.gz bcm5719-llvm-5956dc87d3cb879194bd39f2c5ed5bd69405d015.zip | |
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.
llvm-svn: 85377
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Feature/terminators.ll | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/test/Feature/terminators.ll b/llvm/test/Feature/terminators.ll index d3c68a71429..1bca2a842c5 100644 --- a/llvm/test/Feature/terminators.ll +++ b/llvm/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 } + + |

