diff options
author | Dan Gohman <gohman@apple.com> | 2009-05-05 21:10:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-05-05 21:10:19 +0000 |
commit | bb2f10759ee101a3fed1a5752f7ff4751faba573 (patch) | |
tree | 1738aa7eb401477169b2ed8e62a193fcc8af71c5 /llvm/test/CodeGen/X86/omit-label.ll | |
parent | 1eb40dad172a848bc17d7876186cd9054500de17 (diff) | |
download | bcm5719-llvm-bb2f10759ee101a3fed1a5752f7ff4751faba573.tar.gz bcm5719-llvm-bb2f10759ee101a3fed1a5752f7ff4751faba573.zip |
If a MachineBasicBlock has multiple ways of reaching another block,
allow it to have multiple CFG edges to that block. This is needed
to allow MachineBasicBlock::isOnlyReachableByFallthrough to work
correctly. This fixes PR4126.
llvm-svn: 71018
Diffstat (limited to 'llvm/test/CodeGen/X86/omit-label.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/omit-label.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/omit-label.ll b/llvm/test/CodeGen/X86/omit-label.ll new file mode 100644 index 00000000000..457b66b35dc --- /dev/null +++ b/llvm/test/CodeGen/X86/omit-label.ll @@ -0,0 +1,23 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep BB1_1: +; PR4126 + +; Don't omit this label's definition. + +define void @bux(i32 %p_53) nounwind optsize { +entry: + %0 = icmp eq i32 %p_53, 0 ; <i1> [#uses=1] + %1 = icmp sgt i32 %p_53, 0 ; <i1> [#uses=1] + %or.cond = and i1 %0, %1 ; <i1> [#uses=1] + br i1 %or.cond, label %bb.i, label %bb3 + +bb.i: ; preds = %entry + %2 = add i32 %p_53, 1 ; <i32> [#uses=1] + %3 = icmp slt i32 %2, 0 ; <i1> [#uses=0] + br label %bb3 + +bb3: ; preds = %bb.i, %entry + %4 = tail call i32 (...)* @baz(i32 0) nounwind ; <i32> [#uses=0] + ret void +} + +declare i32 @baz(...) |