Krzysztof Parzyszek | 499bc5f | 2015-04-21 21:28:03 +0000 | [diff] [blame^] | 1 | ; RUN: llc -O2 < %s | FileCheck %s |
| 2 | ; Look for four stores directly via r29. |
| 3 | ; CHECK: memd(r29 |
| 4 | ; CHECK: memd(r29 |
| 5 | ; CHECK: memd(r29 |
| 6 | ; CHECK: memd(r29 |
| 7 | |
| 8 | target datalayout = "e-m:e-p:32:32-i1:32-i64:64-a:0-v32:32-n16:32" |
| 9 | target triple = "hexagon" |
| 10 | |
| 11 | ; Function Attrs: nounwind |
| 12 | define void @foo() #0 { |
| 13 | entry: |
| 14 | %t = alloca [4 x [2 x i32]], align 8 |
| 15 | %0 = bitcast [4 x [2 x i32]]* %t to i8* |
| 16 | call void @llvm.memset.p0i8.i32(i8* %0, i8 0, i32 32, i32 8, i1 false) |
| 17 | %arraydecay = getelementptr inbounds [4 x [2 x i32]], [4 x [2 x i32]]* %t, i32 0, i32 0 |
| 18 | call void @bar([2 x i32]* %arraydecay) #1 |
| 19 | ret void |
| 20 | } |
| 21 | |
| 22 | ; Function Attrs: nounwind |
| 23 | declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) #1 |
| 24 | |
| 25 | declare void @bar([2 x i32]*) #2 |
| 26 | |
| 27 | attributes #0 = { nounwind "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" } |
| 28 | attributes #1 = { nounwind } |
| 29 | attributes #2 = { "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" } |