summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/pr11202.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-11-15 19:08:46 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-11-15 19:08:46 +0000
commitf11e7f13052645709e9948f9279c29adb260fb06 (patch)
treedb08967529cc1337b03d27ca49d1e932923cdf15 /llvm/test/CodeGen/X86/pr11202.ll
parent1fede19ce9e10f8fb6fd5b4f12c930f5c3c60ffa (diff)
downloadbcm5719-llvm-f11e7f13052645709e9948f9279c29adb260fb06.tar.gz
bcm5719-llvm-f11e7f13052645709e9948f9279c29adb260fb06.zip
We currently use a callback to handle an IL pass deleting a BB that still
has a reference to it. Unfortunately, that doesn't work for codegen passes since we don't get notified of MBB's being deleted (the original BB stays). Use that fact to our advantage and after printing a function, check if any of the IL BBs corresponds to a symbol that was not printed. This fixes pr11202. llvm-svn: 144674
Diffstat (limited to 'llvm/test/CodeGen/X86/pr11202.ll')
-rw-r--r--llvm/test/CodeGen/X86/pr11202.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr11202.ll b/llvm/test/CodeGen/X86/pr11202.ll
new file mode 100644
index 00000000000..2b26a69caad
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr11202.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s
+
+@bb = constant [1 x i8*] [i8* blockaddress(@main, %l2)]
+
+define void @main() {
+entry:
+ br label %l1
+
+l1: ; preds = %l2, %entry
+ %a = zext i1 false to i32
+ br label %l2
+
+l2: ; preds = %l1
+ %b = zext i1 false to i32
+ br label %l1
+}
+
+; CHECK: .Ltmp1: # Address of block that was removed by CodeGen
+; CHECK: .quad .Ltmp1
OpenPOWER on IntegriCloud