1; RUN: llc < %s | FileCheck %s 2 3target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" 4target triple = "thumbv5e-none-linux-gnueabi" 5 6; Function Attrs: norecurse nounwind optsize 7define void @f(i32,i32,i32,i32,i32* %x4p, i32* %x5p, i32* %x6p) { 8if.end: 9 br label %while.body 10 11while.body: 12 %ll.0100 = phi i64 [ 0, %if.end ], [ %shr32, %while.body ] 13 %add = add nuw nsw i64 %ll.0100, 0 14 %add3 = add nuw nsw i64 %add, 0 15 %shr = lshr i64 %add3, 32 16 %conv7 = zext i32 %0 to i64 17 %conv9 = zext i32 %1 to i64 18 %add10 = add nuw nsw i64 %conv9, %conv7 19 %add11 = add nuw nsw i64 %add10, %shr 20 %shr14 = lshr i64 %add11, 32 21 %conv16 = zext i32 %2 to i64 22 %conv18 = zext i32 %3 to i64 23 %add19 = add nuw nsw i64 %conv18, %conv16 24 %add20 = add nuw nsw i64 %add19, %shr14 25 %conv21 = trunc i64 %add20 to i32 26 store i32 %conv21, i32* %x6p, align 4 27 %shr23 = lshr i64 %add20, 32 28 %x4 = load i32, i32* %x4p, align 4 29 %conv25 = zext i32 %x4 to i64 30 %x5 = load i32, i32* %x5p, align 4 31 %conv27 = zext i32 %x5 to i64 32 %add28 = add nuw nsw i64 %conv27, %conv25 33 %add29 = add nuw nsw i64 %add28, %shr23 34 %shr32 = lshr i64 %add29, 32 35 br label %while.body 36} 37; CHECK: adds r3, r0, r1 38; CHECK: push {r5} 39; CHECK: pop {r1} 40; CHECK: adcs r1, r5 41; CHECK: ldr r0, [sp, #12] @ 4-byte Reload 42; CHECK: ldr r2, [sp, #8] @ 4-byte Reload 43; CHECK: adds r2, r0, r2 44; CHECK: push {r5} 45; CHECK: pop {r4} 46; CHECK: adcs r4, r5 47; CHECK: adds r0, r2, r5 48; CHECK: push {r3} 49; CHECK: pop {r0} 50; CHECK: adcs r0, r4 51; CHECK: ldr r6, [sp, #4] @ 4-byte Reload 52; CHECK: str r0, [r6] 53; CHECK: ldr r0, [r7] 54; CHECK: ldr r6, [sp] @ 4-byte Reload 55; CHECK: ldr r6, [r6] 56; CHECK: adds r0, r6, r0 57