mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user