1 ; RUN: llc -march=hexagon < %s | FileCheck %s
4 ; CHECK: r{{[1-9]+:[0-9]+}} = memd(r{{[0-9]*}}++#{{[0-9]}}:circ(m{{[01]}}))
5 define i64 @f0(ptr %a0) {
7 %v0 = alloca i64, align 8
8 %v1 = getelementptr inbounds i64, ptr %a0, i32 1
9 store i64 0, ptr %v0, align 8, !tbaa !0
10 %v4 = call ptr @llvm.hexagon.circ.ldd(ptr %v1, ptr %v0, i32 150996984, i32 8)
11 %v5 = load i64, ptr %v0, align 8, !tbaa !0
15 ; Function Attrs: argmemonly nounwind
16 declare ptr @llvm.hexagon.circ.ldd(ptr, ptr, i32, i32) #0
19 ; CHECK: r{{[0-9]*}} = memb(r{{[0-9]*}}++#{{[0-9]}}:circ(m{{[01]}}))
20 define signext i8 @f1(ptr %a0) {
22 %v0 = alloca i8, align 1
23 %v1 = getelementptr inbounds i8, ptr %a0, i32 1
24 store i8 0, ptr %v0, align 1, !tbaa !4
25 %v2 = call ptr @llvm.hexagon.circ.ldb(ptr %v1, ptr %v0, i32 16777471, i32 1)
26 %v3 = load i8, ptr %v0, align 1, !tbaa !4
30 ; Function Attrs: argmemonly nounwind
31 declare ptr @llvm.hexagon.circ.ldb(ptr, ptr, i32, i32) #0
34 ; CHECK: r{{[0-9]*}} = memub(r{{[0-9]*}}++#{{[0-9]}}:circ(m{{[01]}}))
35 define signext i8 @f2(ptr %a0) {
37 %v0 = alloca i8, align 1
38 %v1 = getelementptr inbounds i8, ptr %a0, i32 1
39 store i8 0, ptr %v0, align 1, !tbaa !4
40 %v2 = call ptr @llvm.hexagon.circ.ldub(ptr %v1, ptr %v0, i32 16777471, i32 1)
41 %v3 = load i8, ptr %v0, align 1, !tbaa !4
45 ; Function Attrs: argmemonly nounwind
46 declare ptr @llvm.hexagon.circ.ldub(ptr, ptr, i32, i32) #0
49 ; CHECK: r{{[0-9]*}} = memh(r{{[0-9]*}}++#{{[0-9]}}:circ(m{{[01]}}))
50 define signext i16 @f3(ptr %a0) {
52 %v0 = alloca i16, align 2
53 %v1 = getelementptr inbounds i16, ptr %a0, i32 1
54 store i16 0, ptr %v0, align 2, !tbaa !5
55 %v4 = call ptr @llvm.hexagon.circ.ldh(ptr %v1, ptr %v0, i32 33554942, i32 2)
56 %v5 = load i16, ptr %v0, align 2, !tbaa !5
60 ; Function Attrs: argmemonly nounwind
61 declare ptr @llvm.hexagon.circ.ldh(ptr, ptr, i32, i32) #0
64 ; CHECK: r{{[0-9]*}} = memuh(r{{[0-9]*}}++#{{[0-9]}}:circ(m{{[01]}}))
65 define signext i16 @f4(ptr %a0) {
67 %v0 = alloca i16, align 2
68 %v1 = getelementptr inbounds i16, ptr %a0, i32 1
69 store i16 0, ptr %v0, align 2, !tbaa !5
70 %v4 = call ptr @llvm.hexagon.circ.lduh(ptr %v1, ptr %v0, i32 33554942, i32 2)
71 %v5 = load i16, ptr %v0, align 2, !tbaa !5
75 ; Function Attrs: argmemonly nounwind
76 declare ptr @llvm.hexagon.circ.lduh(ptr, ptr, i32, i32) #0
79 ; CHECK: r{{[0-9]*}} = memw(r{{[0-9]*}}++#{{[0-9]}}:circ(m{{[01]}}))
80 define i32 @f5(ptr %a0) {
82 %v0 = alloca i32, align 4
83 %v1 = getelementptr inbounds i32, ptr %a0, i32 1
84 store i32 0, ptr %v0, align 4, !tbaa !7
85 %v4 = call ptr @llvm.hexagon.circ.ldw(ptr %v1, ptr %v0, i32 50332668, i32 4)
86 %v5 = load i32, ptr %v0, align 4, !tbaa !7
90 ; Function Attrs: argmemonly nounwind
91 declare ptr @llvm.hexagon.circ.ldw(ptr, ptr, i32, i32) #0
93 attributes #0 = { argmemonly nounwind }
96 !1 = !{!"long long", !2, i64 0}
97 !2 = !{!"omnipotent char", !3, i64 0}
98 !3 = !{!"Simple C/C++ TBAA"}
100 !5 = !{!6, !6, i64 0}
101 !6 = !{!"short", !2, i64 0}
102 !7 = !{!8, !8, i64 0}
103 !8 = !{!"long", !2, i64 0}