diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-15 19:09:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-15 19:09:43 +0000 |
commit | 0220ba7995236accae6ac009a2700871fc17007d (patch) | |
tree | 6df3815b77df85e7c42d309f10b9ac445892fcd2 /test | |
parent | ca704957972df96a86f4ef90ce992bce5a9b60e9 (diff) | |
download | llvm-0220ba7995236accae6ac009a2700871fc17007d.tar.gz llvm-0220ba7995236accae6ac009a2700871fc17007d.tar.bz2 llvm-0220ba7995236accae6ac009a2700871fc17007d.tar.xz |
Fix the case when a reference to an address taken BB is emitted in one
function, then the BB is RAUW'd before the definition is emitted. There
are still two cases not being handled, but this should improve us back to
the situation before I touched anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/crash.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGen/X86/crash.ll b/test/CodeGen/X86/crash.ll index cfa1270165..8ce9e6c248 100644 --- a/test/CodeGen/X86/crash.ll +++ b/test/CodeGen/X86/crash.ll @@ -90,3 +90,28 @@ foo: store i8 %8, i8* undef, align 1 ret void } + + +;; Issues with referring to a label that gets RAUW'd later. +define i32 @test6a() nounwind { +entry: + %target = bitcast i8* blockaddress(@test6b, %test_label) to i8* + + call i32 @test6b(i8* %target) + + ret i32 0 +} + +define i32 @test6b(i8* %target) nounwind { +entry: + indirectbr i8* %target, [label %test_label] + +test_label: +; assume some code here... + br label %ret + +ret: + ret i32 -1 +} + + |