1; RUN: llc -mtriple=thumbv6m-eabi -verify-machineinstrs %s -o - | FileCheck %s 2target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-v128:64:128-a:0:32-n32-S64" 3target triple = "thumbv6m--linux-gnueabi" 4 5@d = internal unnamed_addr global i32 0, align 4 6@c = internal global i32* null, align 4 7@e = internal unnamed_addr global i32* null, align 4 8 9; Function Attrs: nounwind optsize 10define void @fn1(i32 %x, i32 %y, i32 %z) #0 { 11entry: 12; CHECK-LABEL: fn1: 13; CHECK: stm r[[BASE:[0-9]]]!, {{.*}} 14; CHECK-NOT: {{.*}} r[[BASE]] 15 %g = alloca i32, align 4 16 %h = alloca i32, align 4 17 %i = alloca i32, align 4 18 store i32 %x, i32* %i, align 4 19 store i32 %y, i32* %h, align 4 20 store i32 %z, i32* %g, align 4 21 %.pr = load i32, i32* @d, align 4 22 %cmp11 = icmp slt i32 %.pr, 1 23 br i1 %cmp11, label %for.inc.lr.ph, label %for.body5 24 25for.inc.lr.ph: ; preds = %entry 26 store i32 1, i32* @d, align 4 27 br label %for.body5 28 29for.body5: ; preds = %entry, %for.inc.lr.ph, %for.body5 30 %f.010 = phi i32 [ %inc7, %for.body5 ], [ 0, %for.inc.lr.ph ], [ 0, %entry ] 31 store volatile i32* %g, i32** @c, align 4 32 %inc7 = add nsw i32 %f.010, 1 33 %exitcond = icmp eq i32 %inc7, 2 34 br i1 %exitcond, label %for.end8, label %for.body5 35 36for.end8: ; preds = %for.body5 37 store i32* %h, i32** @e, align 4 38 ret void 39} 40 41attributes #0 = { nounwind optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 42