67 lines · plain
1; RUN: llc -O2 -arm-atomic-cfg-tidy=0 -o - %s | FileCheck %s2target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"3target triple = "thumbv8-unknown-linux-gnueabihf"4 5; This is a tricky test case.6; The point of it is to create a diamond where both the true block and the7; false block clobber the predicate when viewed as a whole, but only one of them8; clobbers the predicate when considering the instructions they share.9 10; Function Attrs: nounwind11define void @BN_kronecker(i1 %a, i32 %b) #0 {12entry:13 br label %while.cond3814 15while.cond38: ; preds = %if.end111, %entry16 %cmp79 = icmp eq i32 0, 017 br i1 %a, label %cond.true77, label %cond.false8718 19; CHECK: %cond.true7720; CHECK-NEXT: @ in Loop21; CHECK-NEXT: cmp.w {{r[0-9]+}}, #022; CHECK-NEXT: ite eq23; CHECK-NEXT: ldreq24 ; N.b. 16-bit mov instruction in IT block does not set flags.25; CHECK-NEXT: movne26; CHECK-NEXT: mvns27; CHECK-NEXT: b28cond.true77: ; preds = %while.cond3829 br i1 %cmp79, label %cond.end84, label %cond.false8130 31cond.false81: ; preds = %cond.true7732 %0 = load i32, ptr null, align 433 br label %cond.end8434 35cond.end84: ; preds = %cond.false81, %cond.true7736 %cond85 = phi i32 [ %0, %cond.false81 ], [ 0, %cond.true77 ]37 %neg86 = xor i32 %cond85, -138 br label %cond.false10139 40cond.false87: ; preds = %while.cond3841 br i1 %cmp79, label %cond.false101, label %cond.false9142 43cond.false91: ; preds = %cond.false8744 br label %cond.false10145 46cond.false101: ; preds = %cond.false91, %cond.false87, %cond.end8447 %cond97 = phi i32 [ %neg86, %cond.end84 ], [ %b, %cond.false91 ], [ 0, %cond.false87 ]48 %1 = load i32, ptr null, align 449 %and106 = and i32 %cond97, %150 %and107 = and i32 %and106, 251 %tobool108 = icmp ne i32 %and107, 052 br i1 %tobool108, label %if.then109, label %if.end11153 54if.then109: ; preds = %cond.false10155 store i32 0, ptr undef, align 456 br label %if.end11157 58if.end111: ; preds = %if.then109, %cond.false10159 %tobool113 = icmp ne i32 0, 060 br i1 %tobool113, label %while.cond38, label %end61 62end: ; preds = %if.end11163 ret void64}65 66attributes #0 = { nounwind }67