94 lines · plain
1; RUN: llc < %s -mtriple=thumbv7-apple-ios -arm-atomic-cfg-tidy=0 | FileCheck %s2; RUN: llc < %s -mtriple=thumbv7-apple-ios -arm-atomic-cfg-tidy=0 -arm-default-it | FileCheck %s3; RUN: llc < %s -mtriple=thumbv8-apple-ios -arm-atomic-cfg-tidy=0 | FileCheck %s4 5define void @foo(i32 %X, i32 %Y) {6entry:7; CHECK-LABEL: foo:8; CHECK: it ne9; CHECK: cmpne10; CHECK: it hi11; CHECK: bxhi lr12 %tmp1 = icmp ult i32 %X, 4 ; <i1> [#uses=1]13 %tmp4 = icmp eq i32 %Y, 0 ; <i1> [#uses=1]14 %tmp7 = or i1 %tmp4, %tmp1 ; <i1> [#uses=1]15 br i1 %tmp7, label %cond_true, label %UnifiedReturnBlock16 17cond_true: ; preds = %entry18 %tmp10 = call i32 (...) @bar( ) ; <i32> [#uses=0]19 ret void20 21UnifiedReturnBlock: ; preds = %entry22 ret void23}24 25declare i32 @bar(...)26 27; FIXME: Need post-ifcvt branch folding to get rid of the extra br at end of BB1.28 29 %struct.quad_struct = type { i32, i32, ptr, ptr, ptr, ptr, ptr }30 31define fastcc i32 @CountTree(ptr %tree) {32entry:33; CHECK-LABEL: CountTree:34; CHECK: bne35; CHECK: cmp36; CHECK: it eq37; CHECK: cmpeq38 br label %tailrecurse39 40tailrecurse: ; preds = %bb, %entry41 %tmp6 = load ptr, ptr null ; <ptr> [#uses=1]42 %tmp9 = load ptr, ptr null ; <ptr> [#uses=2]43 %tmp12 = load ptr, ptr null ; <ptr> [#uses=1]44 %tmp14 = icmp eq ptr null, null ; <i1> [#uses=1]45 %tmp17 = icmp eq ptr %tmp6, null ; <i1> [#uses=1]46 %tmp23 = icmp eq ptr %tmp9, null ; <i1> [#uses=1]47 %tmp29 = icmp eq ptr %tmp12, null ; <i1> [#uses=1]48 %bothcond = and i1 %tmp17, %tmp14 ; <i1> [#uses=1]49 %bothcond1 = and i1 %bothcond, %tmp23 ; <i1> [#uses=1]50 %bothcond2 = and i1 %bothcond1, %tmp29 ; <i1> [#uses=1]51 br i1 %bothcond2, label %return, label %bb52 53bb: ; preds = %tailrecurse54 %tmp41 = tail call fastcc i32 @CountTree( ptr %tmp9 ) ; <i32> [#uses=0]55 br label %tailrecurse56 57return: ; preds = %tailrecurse58 ret i32 059}60 61 %struct.SString = type { ptr, i32, i32 }62 63declare void @abort()64 65define fastcc void @t1(ptr %word, i8 signext %c) {66entry:67; CHECK-LABEL: t1:68; CHECK: it ne69; CHECK: bxne lr70 %tmp1 = icmp eq ptr %word, null ; <i1> [#uses=1]71 br i1 %tmp1, label %cond_true, label %cond_false72 73cond_true: ; preds = %entry74 tail call void @abort( )75 ret void76 77cond_false: ; preds = %entry78 ret void79}80 81define fastcc void @t2() nounwind {82entry:83; CHECK-LABEL: t2:84; CHECK: cmp r0, #085; CHECK: trap86 br i1 undef, label %bb.i.i3, label %growMapping.exit87 88bb.i.i3: ; preds = %entry89 unreachable90 91growMapping.exit: ; preds = %entry92 unreachable93}94