annotate clang/test/CodeGen/arm-mve-intrinsics/vorrq.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 0572611fdcc8
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
2 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -fallow-half-arguments-and-returns -O0 -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
3 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -fallow-half-arguments-and-returns -O0 -disable-O0-optnone -DPOLYMORPHIC -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
150
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 #include <arm_mve.h>
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 // CHECK-LABEL: @test_vorrq_u8(
anatofuz
parents:
diff changeset
8 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
9 // CHECK-NEXT: [[TMP0:%.*]] = or <16 x i8> [[A:%.*]], [[B:%.*]]
anatofuz
parents:
diff changeset
10 // CHECK-NEXT: ret <16 x i8> [[TMP0]]
anatofuz
parents:
diff changeset
11 //
anatofuz
parents:
diff changeset
12 uint8x16_t test_vorrq_u8(uint8x16_t a, uint8x16_t b)
anatofuz
parents:
diff changeset
13 {
anatofuz
parents:
diff changeset
14 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
15 return vorrq(a, b);
anatofuz
parents:
diff changeset
16 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
17 return vorrq_u8(a, b);
anatofuz
parents:
diff changeset
18 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
19 }
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 // CHECK-LABEL: @test_vorrq_s16(
anatofuz
parents:
diff changeset
22 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
23 // CHECK-NEXT: [[TMP0:%.*]] = or <8 x i16> [[A:%.*]], [[B:%.*]]
anatofuz
parents:
diff changeset
24 // CHECK-NEXT: ret <8 x i16> [[TMP0]]
anatofuz
parents:
diff changeset
25 //
anatofuz
parents:
diff changeset
26 int16x8_t test_vorrq_s16(int16x8_t a, int16x8_t b)
anatofuz
parents:
diff changeset
27 {
anatofuz
parents:
diff changeset
28 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
29 return vorrq(a, b);
anatofuz
parents:
diff changeset
30 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
31 return vorrq_s16(a, b);
anatofuz
parents:
diff changeset
32 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
33 }
anatofuz
parents:
diff changeset
34
anatofuz
parents:
diff changeset
35 // CHECK-LABEL: @test_vorrq_u32(
anatofuz
parents:
diff changeset
36 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
37 // CHECK-NEXT: [[TMP0:%.*]] = or <4 x i32> [[A:%.*]], [[B:%.*]]
anatofuz
parents:
diff changeset
38 // CHECK-NEXT: ret <4 x i32> [[TMP0]]
anatofuz
parents:
diff changeset
39 //
anatofuz
parents:
diff changeset
40 uint32x4_t test_vorrq_u32(uint32x4_t a, uint32x4_t b)
anatofuz
parents:
diff changeset
41 {
anatofuz
parents:
diff changeset
42 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
43 return vorrq(a, b);
anatofuz
parents:
diff changeset
44 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
45 return vorrq_u32(a, b);
anatofuz
parents:
diff changeset
46 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
47 }
anatofuz
parents:
diff changeset
48
anatofuz
parents:
diff changeset
49 // CHECK-LABEL: @test_vorrq_f32(
anatofuz
parents:
diff changeset
50 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
51 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x float> [[A:%.*]] to <4 x i32>
anatofuz
parents:
diff changeset
52 // CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x float> [[B:%.*]] to <4 x i32>
anatofuz
parents:
diff changeset
53 // CHECK-NEXT: [[TMP2:%.*]] = or <4 x i32> [[TMP0]], [[TMP1]]
anatofuz
parents:
diff changeset
54 // CHECK-NEXT: [[TMP3:%.*]] = bitcast <4 x i32> [[TMP2]] to <4 x float>
anatofuz
parents:
diff changeset
55 // CHECK-NEXT: ret <4 x float> [[TMP3]]
anatofuz
parents:
diff changeset
56 //
anatofuz
parents:
diff changeset
57 float32x4_t test_vorrq_f32(float32x4_t a, float32x4_t b)
anatofuz
parents:
diff changeset
58 {
anatofuz
parents:
diff changeset
59 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
60 return vorrq(a, b);
anatofuz
parents:
diff changeset
61 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
62 return vorrq_f32(a, b);
anatofuz
parents:
diff changeset
63 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
64 }
anatofuz
parents:
diff changeset
65
anatofuz
parents:
diff changeset
66 // CHECK-LABEL: @test_vorrq_m_s8(
anatofuz
parents:
diff changeset
67 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
68 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
anatofuz
parents:
diff changeset
69 // CHECK-NEXT: [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
anatofuz
parents:
diff changeset
70 // CHECK-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.orr.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
anatofuz
parents:
diff changeset
71 // CHECK-NEXT: ret <16 x i8> [[TMP2]]
anatofuz
parents:
diff changeset
72 //
anatofuz
parents:
diff changeset
73 int8x16_t test_vorrq_m_s8(int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)
anatofuz
parents:
diff changeset
74 {
anatofuz
parents:
diff changeset
75 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
76 return vorrq_m(inactive, a, b, p);
anatofuz
parents:
diff changeset
77 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
78 return vorrq_m_s8(inactive, a, b, p);
anatofuz
parents:
diff changeset
79 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
80 }
anatofuz
parents:
diff changeset
81
anatofuz
parents:
diff changeset
82 // CHECK-LABEL: @test_vorrq_m_u16(
anatofuz
parents:
diff changeset
83 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
84 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
anatofuz
parents:
diff changeset
85 // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
anatofuz
parents:
diff changeset
86 // CHECK-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.orr.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
anatofuz
parents:
diff changeset
87 // CHECK-NEXT: ret <8 x i16> [[TMP2]]
anatofuz
parents:
diff changeset
88 //
anatofuz
parents:
diff changeset
89 uint16x8_t test_vorrq_m_u16(uint16x8_t inactive, uint16x8_t a, uint16x8_t b, mve_pred16_t p)
anatofuz
parents:
diff changeset
90 {
anatofuz
parents:
diff changeset
91 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
92 return vorrq_m(inactive, a, b, p);
anatofuz
parents:
diff changeset
93 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
94 return vorrq_m_u16(inactive, a, b, p);
anatofuz
parents:
diff changeset
95 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
96 }
anatofuz
parents:
diff changeset
97
anatofuz
parents:
diff changeset
98 // CHECK-LABEL: @test_vorrq_m_s32(
anatofuz
parents:
diff changeset
99 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
100 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
anatofuz
parents:
diff changeset
101 // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
anatofuz
parents:
diff changeset
102 // CHECK-NEXT: [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.orr.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
anatofuz
parents:
diff changeset
103 // CHECK-NEXT: ret <4 x i32> [[TMP2]]
anatofuz
parents:
diff changeset
104 //
anatofuz
parents:
diff changeset
105 int32x4_t test_vorrq_m_s32(int32x4_t inactive, int32x4_t a, int32x4_t b, mve_pred16_t p)
anatofuz
parents:
diff changeset
106 {
anatofuz
parents:
diff changeset
107 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
108 return vorrq_m(inactive, a, b, p);
anatofuz
parents:
diff changeset
109 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
110 return vorrq_m_s32(inactive, a, b, p);
anatofuz
parents:
diff changeset
111 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
112 }
anatofuz
parents:
diff changeset
113
anatofuz
parents:
diff changeset
114 // CHECK-LABEL: @test_vorrq_m_f16(
anatofuz
parents:
diff changeset
115 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
116 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A:%.*]] to <8 x i16>
anatofuz
parents:
diff changeset
117 // CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B:%.*]] to <8 x i16>
anatofuz
parents:
diff changeset
118 // CHECK-NEXT: [[TMP2:%.*]] = zext i16 [[P:%.*]] to i32
anatofuz
parents:
diff changeset
119 // CHECK-NEXT: [[TMP3:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP2]])
anatofuz
parents:
diff changeset
120 // CHECK-NEXT: [[TMP4:%.*]] = bitcast <8 x half> [[INACTIVE:%.*]] to <8 x i16>
anatofuz
parents:
diff changeset
121 // CHECK-NEXT: [[TMP5:%.*]] = call <8 x i16> @llvm.arm.mve.orr.predicated.v8i16.v8i1(<8 x i16> [[TMP0]], <8 x i16> [[TMP1]], <8 x i1> [[TMP3]], <8 x i16> [[TMP4]])
anatofuz
parents:
diff changeset
122 // CHECK-NEXT: [[TMP6:%.*]] = bitcast <8 x i16> [[TMP5]] to <8 x half>
anatofuz
parents:
diff changeset
123 // CHECK-NEXT: ret <8 x half> [[TMP6]]
anatofuz
parents:
diff changeset
124 //
anatofuz
parents:
diff changeset
125 float16x8_t test_vorrq_m_f16(float16x8_t inactive, float16x8_t a, float16x8_t b, mve_pred16_t p)
anatofuz
parents:
diff changeset
126 {
anatofuz
parents:
diff changeset
127 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
128 return vorrq_m(inactive, a, b, p);
anatofuz
parents:
diff changeset
129 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
130 return vorrq_m_f16(inactive, a, b, p);
anatofuz
parents:
diff changeset
131 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
132 }
anatofuz
parents:
diff changeset
133
anatofuz
parents:
diff changeset
134 // CHECK-LABEL: @test_vorrq_x_u8(
anatofuz
parents:
diff changeset
135 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
136 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
anatofuz
parents:
diff changeset
137 // CHECK-NEXT: [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
anatofuz
parents:
diff changeset
138 // CHECK-NEXT: [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.orr.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]], <16 x i8> undef)
anatofuz
parents:
diff changeset
139 // CHECK-NEXT: ret <16 x i8> [[TMP2]]
anatofuz
parents:
diff changeset
140 //
anatofuz
parents:
diff changeset
141 uint8x16_t test_vorrq_x_u8(uint8x16_t a, uint8x16_t b, mve_pred16_t p)
anatofuz
parents:
diff changeset
142 {
anatofuz
parents:
diff changeset
143 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
144 return vorrq_x(a, b, p);
anatofuz
parents:
diff changeset
145 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
146 return vorrq_x_u8(a, b, p);
anatofuz
parents:
diff changeset
147 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
148 }
anatofuz
parents:
diff changeset
149
anatofuz
parents:
diff changeset
150 // CHECK-LABEL: @test_vorrq_x_s16(
anatofuz
parents:
diff changeset
151 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
152 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
anatofuz
parents:
diff changeset
153 // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
anatofuz
parents:
diff changeset
154 // CHECK-NEXT: [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.orr.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]], <8 x i16> undef)
anatofuz
parents:
diff changeset
155 // CHECK-NEXT: ret <8 x i16> [[TMP2]]
anatofuz
parents:
diff changeset
156 //
anatofuz
parents:
diff changeset
157 int16x8_t test_vorrq_x_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
anatofuz
parents:
diff changeset
158 {
anatofuz
parents:
diff changeset
159 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
160 return vorrq_x(a, b, p);
anatofuz
parents:
diff changeset
161 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
162 return vorrq_x_s16(a, b, p);
anatofuz
parents:
diff changeset
163 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
164 }
anatofuz
parents:
diff changeset
165
anatofuz
parents:
diff changeset
166 // CHECK-LABEL: @test_vorrq_x_u32(
anatofuz
parents:
diff changeset
167 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
168 // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
anatofuz
parents:
diff changeset
169 // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
anatofuz
parents:
diff changeset
170 // CHECK-NEXT: [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.orr.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]], <4 x i32> undef)
anatofuz
parents:
diff changeset
171 // CHECK-NEXT: ret <4 x i32> [[TMP2]]
anatofuz
parents:
diff changeset
172 //
anatofuz
parents:
diff changeset
173 uint32x4_t test_vorrq_x_u32(uint32x4_t a, uint32x4_t b, mve_pred16_t p)
anatofuz
parents:
diff changeset
174 {
anatofuz
parents:
diff changeset
175 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
176 return vorrq_x(a, b, p);
anatofuz
parents:
diff changeset
177 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
178 return vorrq_x_u32(a, b, p);
anatofuz
parents:
diff changeset
179 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
180 }
anatofuz
parents:
diff changeset
181
anatofuz
parents:
diff changeset
182 // CHECK-LABEL: @test_vorrq_m_f32(
anatofuz
parents:
diff changeset
183 // CHECK-NEXT: entry:
anatofuz
parents:
diff changeset
184 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <4 x float> [[A:%.*]] to <4 x i32>
anatofuz
parents:
diff changeset
185 // CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x float> [[B:%.*]] to <4 x i32>
anatofuz
parents:
diff changeset
186 // CHECK-NEXT: [[TMP2:%.*]] = zext i16 [[P:%.*]] to i32
anatofuz
parents:
diff changeset
187 // CHECK-NEXT: [[TMP3:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP2]])
anatofuz
parents:
diff changeset
188 // CHECK-NEXT: [[TMP4:%.*]] = call <4 x i32> @llvm.arm.mve.orr.predicated.v4i32.v4i1(<4 x i32> [[TMP0]], <4 x i32> [[TMP1]], <4 x i1> [[TMP3]], <4 x i32> undef)
anatofuz
parents:
diff changeset
189 // CHECK-NEXT: [[TMP5:%.*]] = bitcast <4 x i32> [[TMP4]] to <4 x float>
anatofuz
parents:
diff changeset
190 // CHECK-NEXT: ret <4 x float> [[TMP5]]
anatofuz
parents:
diff changeset
191 //
anatofuz
parents:
diff changeset
192 float32x4_t test_vorrq_m_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)
anatofuz
parents:
diff changeset
193 {
anatofuz
parents:
diff changeset
194 #ifdef POLYMORPHIC
anatofuz
parents:
diff changeset
195 return vorrq_x(a, b, p);
anatofuz
parents:
diff changeset
196 #else /* POLYMORPHIC */
anatofuz
parents:
diff changeset
197 return vorrq_x_f32(a, b, p);
anatofuz
parents:
diff changeset
198 #endif /* POLYMORPHIC */
anatofuz
parents:
diff changeset
199 }