Skip to content

Commit

Permalink
Testcase for r279022
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279031 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
MatzeB committed Aug 18, 2016
1 parent b60f9a2 commit 2b56e93
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/CodeGen/X86/taildup-crash.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
; RUN: llc -o - %s | FileCheck %s
target triple = "x86_64--"

; Make sure we do not crash in tail duplication when finding no successor of a
; block.
; CHECK-LABEL: func:
; CHECK: testb
; CEHCK: je
; CHECK: retq
; CHECK: jmp
define hidden void @func() {
entry:
br i1 undef, label %for.cond.cleanup, label %while.cond.preheader

while.cond.preheader:
br label %while.cond

for.cond.cleanup:
ret void

while.cond:
%cmp.i202 = icmp eq i8* undef, undef
br i1 %cmp.i202, label %while.cond.preheader, label %while.cond
}

0 comments on commit 2b56e93

Please sign in to comment.