[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / builtins-hexagon-circ.c
blob06ffb37c97d74958176812a73230347276562adf
1 // REQUIRES: hexagon-registered-target
2 // RUN: %clang_cc1 -triple hexagon-unknown-elf -target-cpu hexagonv60 -emit-llvm %s -o - | FileCheck %s
4 // CHECK-LABEL: test1
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);
11 // CHECK-LABEL: test2
12 // CHECK: @llvm.hexagon.L2.loadrb.pci
13 unsigned char test2(int mod, void *start) {
14 char *base = start;
15 return __builtin_HEXAGON_L2_loadrb_pci(&base, 4, mod, start);
18 // CHECK-LABEL: test3
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);
25 // CHECK-LABEL: test4
26 // CHECK: @llvm.hexagon.L2.loadrh.pci
27 short test4(int mod, void *start) {
28 short *base = start;
29 return __builtin_HEXAGON_L2_loadrh_pci(&base, 4, mod, start);
32 // CHECK-LABEL: test5
33 // CHECK: @llvm.hexagon.L2.loadri.pci
34 int test5(int mod, void *start) {
35 int *base = start;
36 return __builtin_HEXAGON_L2_loadri_pci(&base, 4, mod, start);
39 // CHECK-LABEL: test6
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);
46 // CHECK-LABEL: test7
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);
53 // CHECK-LABEL: test8
54 // CHECK: @llvm.hexagon.L2.loadrb.pcr
55 unsigned char test8(int mod, void *start) {
56 char *base = start;
57 return __builtin_HEXAGON_L2_loadrb_pcr(&base, mod, start);
60 // CHECK-LABEL: test9
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) {
70 short *base = 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) {
77 int *base = 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) {
91 void *base = start;
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) {
98 void *base = start;
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) {
105 void *base = start;
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) {
112 void *base = start;
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) {
119 void *base = start;
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) {
126 void *base = start;
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) {
133 void *base = start;
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) {
140 void *base = start;
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) {
147 void *base = start;
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) {
154 void *base = start;
155 __builtin_HEXAGON_S2_storerd_pcr(&base, mod, v, start);