1; RUN: llc < %s | FileCheck %s 2target datalayout = "E-m:e-p:32:32-i128:64-n32" 3target triple = "powerpc-ellcc-linux" 4 5; Function Attrs: nounwind 6define void @foo1(i128* %a, i128* readonly %b, i128* readonly %c) #0 { 7entry: 8 br label %for.body 9 10for.body: ; preds = %for.body, %entry 11 %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ] 12 %0 = load i128, i128* %b, align 16 13 %1 = load i128, i128* %c, align 16 14 %shl = shl i128 %0, %1 15 store i128 %shl, i128* %a, align 16 16 %inc = add nsw i32 %i.02, 1 17 %exitcond = icmp eq i32 %inc, 2048 18 br i1 %exitcond, label %for.end, label %for.body 19 20for.end: ; preds = %for.body 21 ret void 22 23; CHECK-LABEL: @foo1 24; CHECK-NOT: mtctr 25} 26 27; Function Attrs: nounwind 28define void @foo2(i128* %a, i128* readonly %b, i128* readonly %c) #0 { 29entry: 30 br label %for.body 31 32for.body: ; preds = %for.body, %entry 33 %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ] 34 %0 = load i128, i128* %b, align 16 35 %1 = load i128, i128* %c, align 16 36 %shl = ashr i128 %0, %1 37 store i128 %shl, i128* %a, align 16 38 %inc = add nsw i32 %i.02, 1 39 %exitcond = icmp eq i32 %inc, 2048 40 br i1 %exitcond, label %for.end, label %for.body 41 42for.end: ; preds = %for.body 43 ret void 44 45; CHECK-LABEL: @foo2 46; CHECK-NOT: mtctr 47} 48 49; Function Attrs: nounwind 50define void @foo3(i128* %a, i128* readonly %b, i128* readonly %c) #0 { 51entry: 52 br label %for.body 53 54for.body: ; preds = %for.body, %entry 55 %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ] 56 %0 = load i128, i128* %b, align 16 57 %1 = load i128, i128* %c, align 16 58 %shl = lshr i128 %0, %1 59 store i128 %shl, i128* %a, align 16 60 %inc = add nsw i32 %i.02, 1 61 %exitcond = icmp eq i32 %inc, 2048 62 br i1 %exitcond, label %for.end, label %for.body 63 64for.end: ; preds = %for.body 65 ret void 66 67; CHECK-LABEL: @foo3 68; CHECK-NOT: mtctr 69} 70 71attributes #0 = { nounwind } 72 73