1 // REQUIRES: hexagon-registered-target
2 // RUN: %clang_cc1 -triple hexagon-unknown-elf -target-cpu hexagonv60 -emit-llvm %s -o - | FileCheck %s
5 // CHECK: @llvm.hexagon.L2.loadrub.pci
6 unsigned char test1(int mod
, void *start
) {
7 unsigned char *base
= start
;
8 return __builtin_HEXAGON_L2_loadrub_pci(&base
, 4, mod
, start
);
12 // CHECK: @llvm.hexagon.L2.loadrb.pci
13 unsigned char test2(int mod
, void *start
) {
15 return __builtin_HEXAGON_L2_loadrb_pci(&base
, 4, mod
, start
);
19 // CHECK: @llvm.hexagon.L2.loadruh.pci
20 unsigned short test3(int mod
, void *start
) {
21 unsigned short *base
= start
;
22 return __builtin_HEXAGON_L2_loadruh_pci(&base
, 4, mod
, start
);
26 // CHECK: @llvm.hexagon.L2.loadrh.pci
27 short test4(int mod
, void *start
) {
29 return __builtin_HEXAGON_L2_loadrh_pci(&base
, 4, mod
, start
);
33 // CHECK: @llvm.hexagon.L2.loadri.pci
34 int test5(int mod
, void *start
) {
36 return __builtin_HEXAGON_L2_loadri_pci(&base
, 4, mod
, start
);
40 // CHECK: @llvm.hexagon.L2.loadrd.pci
41 long long test6(int mod
, void *start
) {
42 long long *base
= start
;
43 return __builtin_HEXAGON_L2_loadrd_pci(&base
, 8, mod
, start
);
47 // CHECK: @llvm.hexagon.L2.loadrub.pcr
48 unsigned char test7(int mod
, void *start
) {
49 unsigned char *base
= start
;
50 return __builtin_HEXAGON_L2_loadrub_pcr(&base
, mod
, start
);
54 // CHECK: @llvm.hexagon.L2.loadrb.pcr
55 unsigned char test8(int mod
, void *start
) {
57 return __builtin_HEXAGON_L2_loadrb_pcr(&base
, mod
, start
);
61 // CHECK: @llvm.hexagon.L2.loadruh.pcr
62 unsigned short test9(int mod
, void *start
) {
63 unsigned short *base
= start
;
64 return __builtin_HEXAGON_L2_loadruh_pcr(&base
, mod
, start
);
67 // CHECK-LABEL: test10
68 // CHECK: @llvm.hexagon.L2.loadrh.pcr
69 short test10(int mod
, void *start
) {
71 return __builtin_HEXAGON_L2_loadrh_pcr(&base
, mod
, start
);
74 // CHECK-LABEL: test11
75 // CHECK: @llvm.hexagon.L2.loadri.pcr
76 int test11(int mod
, void *start
) {
78 return __builtin_HEXAGON_L2_loadri_pcr(&base
, mod
, start
);
81 // CHECK-LABEL: test12
82 // CHECK: @llvm.hexagon.L2.loadrd.pcr
83 long long test12(int mod
, void *start
) {
84 long long *base
= start
;
85 return __builtin_HEXAGON_L2_loadrd_pcr(&base
, mod
, start
);
88 // CHECK-LABEL: test13
89 // CHECK: @llvm.hexagon.S2.storerb.pci
90 void test13(int mod
, void *start
, char v
) {
92 __builtin_HEXAGON_S2_storerb_pci(&base
, 4, mod
, v
, start
);
95 // CHECK-LABEL: test14
96 // CHECK: @llvm.hexagon.S2.storerh.pci
97 void test14(int mod
, void *start
, short v
) {
99 __builtin_HEXAGON_S2_storerh_pci(&base
, 4, mod
, v
, start
);
102 // CHECK-LABEL: test15
103 // CHECK: @llvm.hexagon.S2.storerf.pci
104 void test15(int mod
, void *start
, short v
) {
106 __builtin_HEXAGON_S2_storerf_pci(&base
, 4, mod
, v
, start
);
109 // CHECK-LABEL: test16
110 // CHECK: @llvm.hexagon.S2.storeri.pci
111 void test16(int mod
, void *start
, int v
) {
113 __builtin_HEXAGON_S2_storeri_pci(&base
, 4, mod
, v
, start
);
116 // CHECK-LABEL: test17
117 // CHECK: @llvm.hexagon.S2.storerd.pci
118 void test17(int mod
, void *start
, long long v
) {
120 __builtin_HEXAGON_S2_storerd_pci(&base
, 8, mod
, v
, start
);
123 // CHECK-LABEL: test18
124 // CHECK: @llvm.hexagon.S2.storerb.pcr
125 void test18(int mod
, void *start
, char v
) {
127 __builtin_HEXAGON_S2_storerb_pcr(&base
, mod
, v
, start
);
130 // CHECK-LABEL: test19
131 // CHECK: @llvm.hexagon.S2.storerh.pcr
132 void test19(int mod
, void *start
, short v
) {
134 __builtin_HEXAGON_S2_storerh_pcr(&base
, mod
, v
, start
);
137 // CHECK-LABEL: test20
138 // CHECK: @llvm.hexagon.S2.storerf.pcr
139 void test20(int mod
, void *start
, short v
) {
141 __builtin_HEXAGON_S2_storerf_pcr(&base
, mod
, v
, start
);
144 // CHECK-LABEL: test21
145 // CHECK: @llvm.hexagon.S2.storeri.pcr
146 void test21(int mod
, void *start
, int v
) {
148 __builtin_HEXAGON_S2_storeri_pcr(&base
, mod
, v
, start
);
151 // CHECK-LABEL: test22
152 // CHECK: @llvm.hexagon.S2.storerd.pcr
153 void test22(int mod
, void *start
, long long v
) {
155 __builtin_HEXAGON_S2_storerd_pcr(&base
, mod
, v
, start
);