| Moritz Roth | 8f37656 | 2014-08-15 17:00:30 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=thumbv6m-eabi -verify-machineinstrs %s -o - | FileCheck %s | 
|  | 2 | target 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" | 
|  | 3 | target triple = "thumbv6m--linux-gnueabi" | 
|  | 4 |  | 
|  | 5 | ; Function Attrs: nounwind optsize | 
|  | 6 | define void @foo(i32* nocapture readonly %A) #0 { | 
|  | 7 | entry: | 
|  | 8 | ; CHECK-LABEL: foo: | 
|  | 9 | ; CHECK: ldm r[[BASE:[0-9]]]!, | 
|  | 10 | ; CHECK-NEXT: mov r[[BASE]], | 
| David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 11 | %0 = load i32, i32* %A, align 4 | 
| David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 12 | %arrayidx1 = getelementptr inbounds i32, i32* %A, i32 1 | 
| David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 13 | %1 = load i32, i32* %arrayidx1, align 4 | 
| Moritz Roth | 8f37656 | 2014-08-15 17:00:30 +0000 | [diff] [blame] | 14 | %call = tail call i32 @bar(i32 %0, i32 %1, i32 %0, i32 %1) #2 | 
|  | 15 | %call2 = tail call i32 @bar(i32 %0, i32 %1, i32 %0, i32 %1) #2 | 
|  | 16 | ret void | 
|  | 17 | } | 
|  | 18 |  | 
|  | 19 | ; Function Attrs: optsize | 
|  | 20 | declare i32 @bar(i32, i32, i32, i32) #1 | 
|  | 21 |  | 
|  | 22 | attributes #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" } | 
|  | 23 | attributes #1 = { 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" } | 
|  | 24 | attributes #2 = { nounwind optsize } |