1; RUN: llc < %s -mtriple=thumbv7-apple-darwin -arm-atomic-cfg-tidy=0 | FileCheck %s 2; RUN: llc < %s -mtriple=thumbv7-apple-darwin -arm-atomic-cfg-tidy=0 -arm-default-it | FileCheck %s 3; RUN: llc < %s -mtriple=thumbv8-apple-darwin -arm-atomic-cfg-tidy=0 -arm-no-restrict-it | FileCheck %s 4 5; There shouldn't be a unconditional branch at end of bb52. 6; rdar://7184787 7 8@posed = external global i64 ; <i64*> [#uses=1] 9 10define i1 @ab_bb52(i64 %.reload78, i64* %.out, i64* %.out1) nounwind { 11newFuncRoot: 12 br label %bb52 13 14bb52.bb55_crit_edge.exitStub: ; preds = %bb52 15 store i64 %0, i64* %.out 16 store i64 %2, i64* %.out1 17 ret i1 true 18 19bb52.bb53_crit_edge.exitStub: ; preds = %bb52 20 store i64 %0, i64* %.out 21 store i64 %2, i64* %.out1 22 ret i1 false 23 24bb52: ; preds = %newFuncRoot 25; CHECK: movne 26; CHECK: moveq 27; CHECK: pop 28 %0 = load i64, i64* @posed, align 4 ; <i64> [#uses=3] 29 %1 = sub i64 %0, %.reload78 ; <i64> [#uses=1] 30 %2 = ashr i64 %1, 1 ; <i64> [#uses=3] 31 %3 = icmp eq i64 %2, 0 ; <i1> [#uses=1] 32 br i1 %3, label %bb52.bb55_crit_edge.exitStub, label %bb52.bb53_crit_edge.exitStub 33} 34