From 5412d06e9c352c9795f4a71b91c4f869585866eb Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 5 May 2009 21:10:19 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71018 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/omit-label.ll | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/CodeGen/X86/omit-label.ll (limited to 'test/CodeGen/X86/omit-label.ll') diff --git a/test/CodeGen/X86/omit-label.ll b/test/CodeGen/X86/omit-label.ll new file mode 100644 index 0000000..457b66b --- /dev/null +++ b/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 ; [#uses=1] + %1 = icmp sgt i32 %p_53, 0 ; [#uses=1] + %or.cond = and i1 %0, %1 ; [#uses=1] + br i1 %or.cond, label %bb.i, label %bb3 + +bb.i: ; preds = %entry + %2 = add i32 %p_53, 1 ; [#uses=1] + %3 = icmp slt i32 %2, 0 ; [#uses=0] + br label %bb3 + +bb3: ; preds = %bb.i, %entry + %4 = tail call i32 (...)* @baz(i32 0) nounwind ; [#uses=0] + ret void +} + +declare i32 @baz(...) -- cgit v1.1