Krzysztof Parzyszek | 046090d | 2018-03-12 14:01:28 +0000 | [diff] [blame] | 1 | ; RUN: llc -O2 -march=hexagon < %s | FileCheck %s |
| 2 | ; Make sure we don't use setbit to add offsets to stack objects. |
| 3 | ; CHECK-NOT: setbit |
| 4 | |
| 5 | target triple = "hexagon-unknown--elf" |
| 6 | |
| 7 | ; Function Attrs: nounwind |
| 8 | define void @f0() #0 { |
| 9 | b0: |
| 10 | %v0 = alloca [64 x float], align 16 |
| 11 | %v1 = bitcast [64 x float]* %v0 to i8* |
| 12 | call void @llvm.lifetime.start.p0i8(i64 256, i8* %v1) #1 |
| 13 | %v2 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 8 |
| 14 | store float 0.000000e+00, float* %v2, align 16, !tbaa !0 |
| 15 | %v3 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 0 |
| 16 | store float 0.000000e+00, float* %v3, align 16, !tbaa !0 |
| 17 | %v4 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 9 |
| 18 | store float 0.000000e+00, float* %v4, align 4, !tbaa !0 |
| 19 | %v5 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 1 |
| 20 | store float 0.000000e+00, float* %v5, align 4, !tbaa !0 |
| 21 | %v6 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 10 |
| 22 | store float 0.000000e+00, float* %v6, align 8, !tbaa !0 |
| 23 | %v7 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 2 |
| 24 | store float 0.000000e+00, float* %v7, align 8, !tbaa !0 |
| 25 | %v8 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 11 |
| 26 | store float 1.000000e+00, float* %v8, align 4, !tbaa !0 |
| 27 | %v9 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 3 |
| 28 | store float 1.000000e+00, float* %v9, align 4, !tbaa !0 |
| 29 | %v10 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 12 |
| 30 | store float 0.000000e+00, float* %v10, align 16, !tbaa !0 |
| 31 | %v11 = getelementptr inbounds [64 x float], [64 x float]* %v0, i32 0, i32 4 |
| 32 | store float 0.000000e+00, float* %v11, align 16, !tbaa !0 |
| 33 | call void @f1(float* %v3) #2 |
| 34 | call void @llvm.lifetime.end.p0i8(i64 256, i8* %v1) #1 |
| 35 | ret void |
| 36 | } |
| 37 | |
| 38 | declare void @f1(float*) #0 |
| 39 | |
| 40 | ; Function Attrs: argmemonly nounwind |
| 41 | declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 |
| 42 | |
| 43 | ; Function Attrs: argmemonly nounwind |
| 44 | declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 |
| 45 | |
| 46 | attributes #0 = { nounwind "target-cpu"="hexagonv55" } |
| 47 | attributes #1 = { argmemonly nounwind } |
| 48 | attributes #2 = { nounwind } |
| 49 | |
| 50 | !0 = !{!1, !1, i64 0} |
| 51 | !1 = !{!"float", !2} |
| 52 | !2 = !{!"omnipotent char", !3} |
| 53 | !3 = !{!"Simple C/C++ TBAA"} |