1 ; RUN: llc -o - %s | FileCheck %s 2 target triple = "x86_64--" 3 4 ; Make sure we do not crash in tail duplication when finding no successor of a 5 ; block. 6 ; CHECK-LABEL: func: 7 ; CHECK: testb 8 ; CEHCK: je 9 ; CHECK: retq 10 ; CHECK: jmp 11 define hidden void @func() { 12 entry: 13 br i1 undef, label %for.cond.cleanup, label %while.cond.preheader 14 15 while.cond.preheader: 16 br label %while.cond 17 18 for.cond.cleanup: 19 ret void 20 21 while.cond: 22 %cmp.i202 = icmp eq i8* undef, undef 23 br i1 %cmp.i202, label %while.cond.preheader, label %while.cond 24 } 25