Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
case ARM::BI__builtin_arm_cde_cx1d: {
2
  Value *Val0 = EmitScalarExpr(E->getArg(0));
3
  Value *Val1 = EmitScalarExpr(E->getArg(1));
4
  Value *Val2 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_cx1d), {Val0, Val1});
5
  Value *Val3 = Builder.CreateExtractValue(Val2, static_cast<unsigned>(1));
6
  Value *Val4 = Builder.CreateIntCast(Val3, Int64Ty, false);
7
  Value *Val5 = llvm::ConstantInt::get(Int64Ty, 32);
8
  Value *Val6 = Builder.CreateShl(Val4, Val5);
9
  Value *Val7 = Builder.CreateExtractValue(Val2, static_cast<unsigned>(0));
10
  Value *Val8 = Builder.CreateIntCast(Val7, Int64Ty, false);
11
  return Builder.CreateOr(Val6, Val8);
12
}
13
case ARM::BI__builtin_arm_cde_vcx1d_u64: {
14
  Value *Val0 = EmitScalarExpr(E->getArg(0));
15
  Value *Val1 = EmitScalarExpr(E->getArg(1));
16
  Value *Val2 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx1, {DoubleTy}), {Val0, Val1});
17
  llvm::Type *Val3 = Int64Ty;
18
  return Builder.CreateBitCast(Val2, Val3);
19
}
20
case ARM::BI__builtin_arm_cde_vcx1_u32: {
21
  Value *Val0 = EmitScalarExpr(E->getArg(0));
22
  Value *Val1 = EmitScalarExpr(E->getArg(1));
23
  Value *Val2 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx1, {FloatTy}), {Val0, Val1});
24
  llvm::Type *Val3 = Int32Ty;
25
  return Builder.CreateBitCast(Val2, Val3);
26
}
27
case ARM::BI__builtin_arm_cde_cx2d: {
28
  Value *Val0 = EmitScalarExpr(E->getArg(0));
29
  Value *Val1 = EmitScalarExpr(E->getArg(1));
30
  Value *Val2 = EmitScalarExpr(E->getArg(2));
31
  Value *Val3 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_cx2d), {Val0, Val1, Val2});
32
  Value *Val4 = Builder.CreateExtractValue(Val3, static_cast<unsigned>(1));
33
  Value *Val5 = Builder.CreateIntCast(Val4, Int64Ty, false);
34
  Value *Val6 = llvm::ConstantInt::get(Int64Ty, 32);
35
  Value *Val7 = Builder.CreateShl(Val5, Val6);
36
  Value *Val8 = Builder.CreateExtractValue(Val3, static_cast<unsigned>(0));
37
  Value *Val9 = Builder.CreateIntCast(Val8, Int64Ty, false);
38
  return Builder.CreateOr(Val7, Val9);
39
}
40
case ARM::BI__builtin_arm_cde_cx3d: {
41
  Value *Val0 = EmitScalarExpr(E->getArg(0));
42
  Value *Val1 = EmitScalarExpr(E->getArg(1));
43
  Value *Val2 = EmitScalarExpr(E->getArg(2));
44
  Value *Val3 = EmitScalarExpr(E->getArg(3));
45
  Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_cx3d), {Val0, Val1, Val2, Val3});
46
  Value *Val5 = Builder.CreateExtractValue(Val4, static_cast<unsigned>(1));
47
  Value *Val6 = Builder.CreateIntCast(Val5, Int64Ty, false);
48
  Value *Val7 = llvm::ConstantInt::get(Int64Ty, 32);
49
  Value *Val8 = Builder.CreateShl(Val6, Val7);
50
  Value *Val9 = Builder.CreateExtractValue(Val4, static_cast<unsigned>(0));
51
  Value *Val10 = Builder.CreateIntCast(Val9, Int64Ty, false);
52
  return Builder.CreateOr(Val8, Val10);
53
}
54
case ARM::BI__builtin_arm_cde_vcx1q_m_f16:
55
case ARM::BI__builtin_arm_cde_vcx1q_m_f32:
56
case ARM::BI__builtin_arm_cde_vcx1q_m_s16:
57
case ARM::BI__builtin_arm_cde_vcx1q_m_s32:
58
case ARM::BI__builtin_arm_cde_vcx1q_m_s64:
59
case ARM::BI__builtin_arm_cde_vcx1q_m_s8:
60
case ARM::BI__builtin_arm_cde_vcx1q_m_u16:
61
case ARM::BI__builtin_arm_cde_vcx1q_m_u32:
62
case ARM::BI__builtin_arm_cde_vcx1q_m_u64:
63
case ARM::BI__builtin_arm_cde_vcx1q_m_u8:
64
case ARM::BI__builtin_arm_cde_vcx1qa_m_f16:
65
case ARM::BI__builtin_arm_cde_vcx1qa_m_f32:
66
case ARM::BI__builtin_arm_cde_vcx1qa_m_s16:
67
case ARM::BI__builtin_arm_cde_vcx1qa_m_s32:
68
case ARM::BI__builtin_arm_cde_vcx1qa_m_s64:
69
case ARM::BI__builtin_arm_cde_vcx1qa_m_s8:
70
case ARM::BI__builtin_arm_cde_vcx1qa_m_u16:
71
case ARM::BI__builtin_arm_cde_vcx1qa_m_u32:
72
case ARM::BI__builtin_arm_cde_vcx1qa_m_u64:
73
case ARM::BI__builtin_arm_cde_vcx1qa_m_u8: {
74
  llvm::Type * Param0;
75
  Intrinsic::ID  Param1;
76
  llvm::Type * Param2;
77
  switch (BuiltinID) {
78
  case ARM::BI__builtin_arm_cde_vcx1q_m_f16:
79
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
80
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
81
    Param2 = llvm::FixedVectorType::get(HalfTy, 8);
82
    break;
83
  case ARM::BI__builtin_arm_cde_vcx1q_m_f32:
84
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
85
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
86
    Param2 = llvm::FixedVectorType::get(FloatTy, 4);
87
    break;
88
  case ARM::BI__builtin_arm_cde_vcx1q_m_s16:
89
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
90
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
91
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
92
    break;
93
  case ARM::BI__builtin_arm_cde_vcx1q_m_s32:
94
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
95
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
96
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
97
    break;
98
  case ARM::BI__builtin_arm_cde_vcx1q_m_s64:
99
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
100
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
101
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
102
    break;
103
  case ARM::BI__builtin_arm_cde_vcx1q_m_s8:
104
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
105
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
106
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
107
    break;
108
  case ARM::BI__builtin_arm_cde_vcx1q_m_u16:
109
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
110
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
111
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
112
    break;
113
  case ARM::BI__builtin_arm_cde_vcx1q_m_u32:
114
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
115
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
116
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
117
    break;
118
  case ARM::BI__builtin_arm_cde_vcx1q_m_u64:
119
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
120
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
121
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
122
    break;
123
  case ARM::BI__builtin_arm_cde_vcx1q_m_u8:
124
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
125
    Param1 = Intrinsic::arm_cde_vcx1q_predicated;
126
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
127
    break;
128
  case ARM::BI__builtin_arm_cde_vcx1qa_m_f16:
129
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
130
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
131
    Param2 = llvm::FixedVectorType::get(HalfTy, 8);
132
    break;
133
  case ARM::BI__builtin_arm_cde_vcx1qa_m_f32:
134
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
135
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
136
    Param2 = llvm::FixedVectorType::get(FloatTy, 4);
137
    break;
138
  case ARM::BI__builtin_arm_cde_vcx1qa_m_s16:
139
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
140
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
141
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
142
    break;
143
  case ARM::BI__builtin_arm_cde_vcx1qa_m_s32:
144
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
145
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
146
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
147
    break;
148
  case ARM::BI__builtin_arm_cde_vcx1qa_m_s64:
149
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
150
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
151
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
152
    break;
153
  case ARM::BI__builtin_arm_cde_vcx1qa_m_s8:
154
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
155
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
156
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
157
    break;
158
  case ARM::BI__builtin_arm_cde_vcx1qa_m_u16:
159
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
160
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
161
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
162
    break;
163
  case ARM::BI__builtin_arm_cde_vcx1qa_m_u32:
164
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
165
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
166
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
167
    break;
168
  case ARM::BI__builtin_arm_cde_vcx1qa_m_u64:
169
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
170
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
171
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
172
    break;
173
  case ARM::BI__builtin_arm_cde_vcx1qa_m_u8:
174
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
175
    Param1 = Intrinsic::arm_cde_vcx1qa_predicated;
176
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
177
    break;
178
  }
179
  Value *Val0 = EmitScalarExpr(E->getArg(0));
180
  Value *Val1 = EmitScalarExpr(E->getArg(1));
181
  Value *Val2 = EmitScalarExpr(E->getArg(2));
182
  Value *Val3 = EmitScalarExpr(E->getArg(3));
183
  Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false);
184
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param0}), {Val4});
185
  return Builder.CreateCall(CGM.getIntrinsic(Param1, {Param2, Param0}), {Val0, Val1, Val2, Val5});
186
}
187
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_f16:
188
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_f32:
189
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_s16:
190
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_s32:
191
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_s64:
192
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_s8:
193
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_u16:
194
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_u32:
195
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_u64:
196
case ARM::BI__builtin_arm_cde_vcx2q_m_impl_u8:
197
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_f16:
198
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_f32:
199
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_s16:
200
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_s32:
201
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_s64:
202
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_s8:
203
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_u16:
204
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_u32:
205
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_u64:
206
case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_u8: {
207
  llvm::Type * Param0;
208
  Intrinsic::ID  Param1;
209
  llvm::Type * Param2;
210
  switch (BuiltinID) {
211
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_f16:
212
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
213
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
214
    Param2 = llvm::FixedVectorType::get(HalfTy, 8);
215
    break;
216
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_f32:
217
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
218
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
219
    Param2 = llvm::FixedVectorType::get(FloatTy, 4);
220
    break;
221
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_s16:
222
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
223
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
224
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
225
    break;
226
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_s32:
227
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
228
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
229
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
230
    break;
231
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_s64:
232
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
233
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
234
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
235
    break;
236
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_s8:
237
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
238
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
239
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
240
    break;
241
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_u16:
242
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
243
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
244
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
245
    break;
246
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_u32:
247
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
248
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
249
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
250
    break;
251
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_u64:
252
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
253
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
254
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
255
    break;
256
  case ARM::BI__builtin_arm_cde_vcx2q_m_impl_u8:
257
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
258
    Param1 = Intrinsic::arm_cde_vcx2q_predicated;
259
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
260
    break;
261
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_f16:
262
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
263
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
264
    Param2 = llvm::FixedVectorType::get(HalfTy, 8);
265
    break;
266
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_f32:
267
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
268
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
269
    Param2 = llvm::FixedVectorType::get(FloatTy, 4);
270
    break;
271
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_s16:
272
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
273
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
274
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
275
    break;
276
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_s32:
277
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
278
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
279
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
280
    break;
281
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_s64:
282
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
283
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
284
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
285
    break;
286
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_s8:
287
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
288
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
289
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
290
    break;
291
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_u16:
292
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
293
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
294
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
295
    break;
296
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_u32:
297
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
298
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
299
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
300
    break;
301
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_u64:
302
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
303
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
304
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
305
    break;
306
  case ARM::BI__builtin_arm_cde_vcx2qa_m_impl_u8:
307
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
308
    Param1 = Intrinsic::arm_cde_vcx2qa_predicated;
309
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
310
    break;
311
  }
312
  Value *Val0 = EmitScalarExpr(E->getArg(0));
313
  Value *Val1 = EmitScalarExpr(E->getArg(1));
314
  Value *Val2 = EmitScalarExpr(E->getArg(2));
315
  Value *Val3 = EmitScalarExpr(E->getArg(3));
316
  Value *Val4 = EmitScalarExpr(E->getArg(4));
317
  Value *Val5 = Builder.CreateIntCast(Val4, Int32Ty, false);
318
  Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param0}), {Val5});
319
  return Builder.CreateCall(CGM.getIntrinsic(Param1, {Param2, Param0}), {Val0, Val1, Val2, Val3, Val6});
320
}
321
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_f16:
322
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_f32:
323
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_s16:
324
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_s32:
325
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_s64:
326
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_s8:
327
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_u16:
328
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_u32:
329
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_u64:
330
case ARM::BI__builtin_arm_cde_vcx3q_m_impl_u8:
331
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_f16:
332
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_f32:
333
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_s16:
334
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_s32:
335
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_s64:
336
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_s8:
337
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_u16:
338
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_u32:
339
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_u64:
340
case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_u8: {
341
  llvm::Type * Param0;
342
  Intrinsic::ID  Param1;
343
  llvm::Type * Param2;
344
  switch (BuiltinID) {
345
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_f16:
346
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
347
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
348
    Param2 = llvm::FixedVectorType::get(HalfTy, 8);
349
    break;
350
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_f32:
351
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
352
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
353
    Param2 = llvm::FixedVectorType::get(FloatTy, 4);
354
    break;
355
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_s16:
356
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
357
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
358
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
359
    break;
360
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_s32:
361
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
362
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
363
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
364
    break;
365
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_s64:
366
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
367
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
368
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
369
    break;
370
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_s8:
371
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
372
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
373
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
374
    break;
375
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_u16:
376
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
377
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
378
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
379
    break;
380
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_u32:
381
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
382
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
383
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
384
    break;
385
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_u64:
386
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
387
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
388
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
389
    break;
390
  case ARM::BI__builtin_arm_cde_vcx3q_m_impl_u8:
391
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
392
    Param1 = Intrinsic::arm_cde_vcx3q_predicated;
393
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
394
    break;
395
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_f16:
396
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
397
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
398
    Param2 = llvm::FixedVectorType::get(HalfTy, 8);
399
    break;
400
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_f32:
401
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
402
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
403
    Param2 = llvm::FixedVectorType::get(FloatTy, 4);
404
    break;
405
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_s16:
406
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
407
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
408
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
409
    break;
410
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_s32:
411
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
412
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
413
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
414
    break;
415
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_s64:
416
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
417
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
418
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
419
    break;
420
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_s8:
421
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
422
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
423
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
424
    break;
425
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_u16:
426
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8);
427
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
428
    Param2 = llvm::FixedVectorType::get(Int16Ty, 8);
429
    break;
430
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_u32:
431
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4);
432
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
433
    Param2 = llvm::FixedVectorType::get(Int32Ty, 4);
434
    break;
435
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_u64:
436
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 2);
437
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
438
    Param2 = llvm::FixedVectorType::get(Int64Ty, 2);
439
    break;
440
  case ARM::BI__builtin_arm_cde_vcx3qa_m_impl_u8:
441
    Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16);
442
    Param1 = Intrinsic::arm_cde_vcx3qa_predicated;
443
    Param2 = llvm::FixedVectorType::get(Int8Ty, 16);
444
    break;
445
  }
446
  Value *Val0 = EmitScalarExpr(E->getArg(0));
447
  Value *Val1 = EmitScalarExpr(E->getArg(1));
448
  Value *Val2 = EmitScalarExpr(E->getArg(2));
449
  Value *Val3 = EmitScalarExpr(E->getArg(3));
450
  Value *Val4 = EmitScalarExpr(E->getArg(4));
451
  Value *Val5 = EmitScalarExpr(E->getArg(5));
452
  Value *Val6 = Builder.CreateIntCast(Val5, Int32Ty, false);
453
  Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param0}), {Val6});
454
  return Builder.CreateCall(CGM.getIntrinsic(Param1, {Param2, Param0}), {Val0, Val1, Val2, Val3, Val4, Val7});
455
}
456
case ARM::BI__builtin_arm_cde_cx3a: {
457
  Value *Val0 = EmitScalarExpr(E->getArg(0));
458
  Value *Val1 = EmitScalarExpr(E->getArg(1));
459
  Value *Val2 = EmitScalarExpr(E->getArg(2));
460
  Value *Val3 = EmitScalarExpr(E->getArg(3));
461
  Value *Val4 = EmitScalarExpr(E->getArg(4));
462
  return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_cx3a), {Val0, Val1, Val2, Val3, Val4});
463
}
464
case ARM::BI__builtin_arm_cde_cx2a:
465
case ARM::BI__builtin_arm_cde_cx3: {
466
  Intrinsic::ID  Param0;
467
  switch (BuiltinID) {
468
  case ARM::BI__builtin_arm_cde_cx2a:
469
    Param0 = Intrinsic::arm_cde_cx2a;
470
    break;
471
  case ARM::BI__builtin_arm_cde_cx3:
472
    Param0 = Intrinsic::arm_cde_cx3;
473
    break;
474
  }
475
  Value *Val0 = EmitScalarExpr(E->getArg(0));
476
  Value *Val1 = EmitScalarExpr(E->getArg(1));
477
  Value *Val2 = EmitScalarExpr(E->getArg(2));
478
  Value *Val3 = EmitScalarExpr(E->getArg(3));
479
  return Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val1, Val2, Val3});
480
}
481
case ARM::BI__builtin_arm_cde_cx1a:
482
case ARM::BI__builtin_arm_cde_cx2: {
483
  Intrinsic::ID  Param0;
484
  switch (BuiltinID) {
485
  case ARM::BI__builtin_arm_cde_cx1a:
486
    Param0 = Intrinsic::arm_cde_cx1a;
487
    break;
488
  case ARM::BI__builtin_arm_cde_cx2:
489
    Param0 = Intrinsic::arm_cde_cx2;
490
    break;
491
  }
492
  Value *Val0 = EmitScalarExpr(E->getArg(0));
493
  Value *Val1 = EmitScalarExpr(E->getArg(1));
494
  Value *Val2 = EmitScalarExpr(E->getArg(2));
495
  return Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val1, Val2});
496
}
497
case ARM::BI__builtin_arm_cde_vcx1da_u64:
498
case ARM::BI__builtin_arm_cde_vcx2d_u64: {
499
  Intrinsic::ID  Param0;
500
  switch (BuiltinID) {
501
  case ARM::BI__builtin_arm_cde_vcx1da_u64:
502
    Param0 = Intrinsic::arm_cde_vcx1a;
503
    break;
504
  case ARM::BI__builtin_arm_cde_vcx2d_u64:
505
    Param0 = Intrinsic::arm_cde_vcx2;
506
    break;
507
  }
508
  Value *Val0 = EmitScalarExpr(E->getArg(0));
509
  Value *Val1 = EmitScalarExpr(E->getArg(1));
510
  llvm::Type *Val2 = DoubleTy;
511
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
512
  Value *Val4 = EmitScalarExpr(E->getArg(2));
513
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Param0, {DoubleTy}), {Val0, Val3, Val4});
514
  llvm::Type *Val6 = Int64Ty;
515
  return Builder.CreateBitCast(Val5, Val6);
516
}
517
case ARM::BI__builtin_arm_cde_vcx2da_u64:
518
case ARM::BI__builtin_arm_cde_vcx3d_u64: {
519
  Intrinsic::ID  Param0;
520
  switch (BuiltinID) {
521
  case ARM::BI__builtin_arm_cde_vcx2da_u64:
522
    Param0 = Intrinsic::arm_cde_vcx2a;
523
    break;
524
  case ARM::BI__builtin_arm_cde_vcx3d_u64:
525
    Param0 = Intrinsic::arm_cde_vcx3;
526
    break;
527
  }
528
  Value *Val0 = EmitScalarExpr(E->getArg(0));
529
  Value *Val1 = EmitScalarExpr(E->getArg(1));
530
  llvm::Type *Val2 = DoubleTy;
531
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
532
  Value *Val4 = EmitScalarExpr(E->getArg(2));
533
  llvm::Type *Val5 = DoubleTy;
534
  Value *Val6 = Builder.CreateBitCast(Val4, Val5);
535
  Value *Val7 = EmitScalarExpr(E->getArg(3));
536
  Value *Val8 = Builder.CreateCall(CGM.getIntrinsic(Param0, {DoubleTy}), {Val0, Val3, Val6, Val7});
537
  llvm::Type *Val9 = Int64Ty;
538
  return Builder.CreateBitCast(Val8, Val9);
539
}
540
case ARM::BI__builtin_arm_cde_vcx3da_u64: {
541
  Value *Val0 = EmitScalarExpr(E->getArg(0));
542
  Value *Val1 = EmitScalarExpr(E->getArg(1));
543
  llvm::Type *Val2 = DoubleTy;
544
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
545
  Value *Val4 = EmitScalarExpr(E->getArg(2));
546
  llvm::Type *Val5 = DoubleTy;
547
  Value *Val6 = Builder.CreateBitCast(Val4, Val5);
548
  Value *Val7 = EmitScalarExpr(E->getArg(3));
549
  llvm::Type *Val8 = DoubleTy;
550
  Value *Val9 = Builder.CreateBitCast(Val7, Val8);
551
  Value *Val10 = EmitScalarExpr(E->getArg(4));
552
  Value *Val11 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3a, {DoubleTy}), {Val0, Val3, Val6, Val9, Val10});
553
  llvm::Type *Val12 = Int64Ty;
554
  return Builder.CreateBitCast(Val11, Val12);
555
}
556
case ARM::BI__builtin_arm_cde_vcx1a_u32:
557
case ARM::BI__builtin_arm_cde_vcx2_u32: {
558
  Intrinsic::ID  Param0;
559
  switch (BuiltinID) {
560
  case ARM::BI__builtin_arm_cde_vcx1a_u32:
561
    Param0 = Intrinsic::arm_cde_vcx1a;
562
    break;
563
  case ARM::BI__builtin_arm_cde_vcx2_u32:
564
    Param0 = Intrinsic::arm_cde_vcx2;
565
    break;
566
  }
567
  Value *Val0 = EmitScalarExpr(E->getArg(0));
568
  Value *Val1 = EmitScalarExpr(E->getArg(1));
569
  llvm::Type *Val2 = FloatTy;
570
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
571
  Value *Val4 = EmitScalarExpr(E->getArg(2));
572
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Param0, {FloatTy}), {Val0, Val3, Val4});
573
  llvm::Type *Val6 = Int32Ty;
574
  return Builder.CreateBitCast(Val5, Val6);
575
}
576
case ARM::BI__builtin_arm_cde_vcx2a_u32:
577
case ARM::BI__builtin_arm_cde_vcx3_u32: {
578
  Intrinsic::ID  Param0;
579
  switch (BuiltinID) {
580
  case ARM::BI__builtin_arm_cde_vcx2a_u32:
581
    Param0 = Intrinsic::arm_cde_vcx2a;
582
    break;
583
  case ARM::BI__builtin_arm_cde_vcx3_u32:
584
    Param0 = Intrinsic::arm_cde_vcx3;
585
    break;
586
  }
587
  Value *Val0 = EmitScalarExpr(E->getArg(0));
588
  Value *Val1 = EmitScalarExpr(E->getArg(1));
589
  llvm::Type *Val2 = FloatTy;
590
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
591
  Value *Val4 = EmitScalarExpr(E->getArg(2));
592
  llvm::Type *Val5 = FloatTy;
593
  Value *Val6 = Builder.CreateBitCast(Val4, Val5);
594
  Value *Val7 = EmitScalarExpr(E->getArg(3));
595
  Value *Val8 = Builder.CreateCall(CGM.getIntrinsic(Param0, {FloatTy}), {Val0, Val3, Val6, Val7});
596
  llvm::Type *Val9 = Int32Ty;
597
  return Builder.CreateBitCast(Val8, Val9);
598
}
599
case ARM::BI__builtin_arm_cde_vcx3a_u32: {
600
  Value *Val0 = EmitScalarExpr(E->getArg(0));
601
  Value *Val1 = EmitScalarExpr(E->getArg(1));
602
  llvm::Type *Val2 = FloatTy;
603
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
604
  Value *Val4 = EmitScalarExpr(E->getArg(2));
605
  llvm::Type *Val5 = FloatTy;
606
  Value *Val6 = Builder.CreateBitCast(Val4, Val5);
607
  Value *Val7 = EmitScalarExpr(E->getArg(3));
608
  llvm::Type *Val8 = FloatTy;
609
  Value *Val9 = Builder.CreateBitCast(Val7, Val8);
610
  Value *Val10 = EmitScalarExpr(E->getArg(4));
611
  Value *Val11 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3a, {FloatTy}), {Val0, Val3, Val6, Val9, Val10});
612
  llvm::Type *Val12 = Int32Ty;
613
  return Builder.CreateBitCast(Val11, Val12);
614
}
615
case ARM::BI__builtin_arm_cde_vcx1qa_f32:
616
case ARM::BI__builtin_arm_cde_vcx2q_f32: {
617
  Intrinsic::ID  Param0;
618
  switch (BuiltinID) {
619
  case ARM::BI__builtin_arm_cde_vcx1qa_f32:
620
    Param0 = Intrinsic::arm_cde_vcx1qa;
621
    break;
622
  case ARM::BI__builtin_arm_cde_vcx2q_f32:
623
    Param0 = Intrinsic::arm_cde_vcx2q;
624
    break;
625
  }
626
  Value *Val0 = EmitScalarExpr(E->getArg(0));
627
  Value *Val1 = EmitScalarExpr(E->getArg(1));
628
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
629
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
630
  Value *Val4 = EmitScalarExpr(E->getArg(2));
631
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4});
632
  llvm::Type *Val6 = llvm::FixedVectorType::get(FloatTy, 4);
633
  return Builder.CreateBitCast(Val5, Val6);
634
}
635
case ARM::BI__builtin_arm_cde_vcx1qa_f16:
636
case ARM::BI__builtin_arm_cde_vcx2q_f16: {
637
  Intrinsic::ID  Param0;
638
  switch (BuiltinID) {
639
  case ARM::BI__builtin_arm_cde_vcx1qa_f16:
640
    Param0 = Intrinsic::arm_cde_vcx1qa;
641
    break;
642
  case ARM::BI__builtin_arm_cde_vcx2q_f16:
643
    Param0 = Intrinsic::arm_cde_vcx2q;
644
    break;
645
  }
646
  Value *Val0 = EmitScalarExpr(E->getArg(0));
647
  Value *Val1 = EmitScalarExpr(E->getArg(1));
648
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
649
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
650
  Value *Val4 = EmitScalarExpr(E->getArg(2));
651
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4});
652
  llvm::Type *Val6 = llvm::FixedVectorType::get(HalfTy, 8);
653
  return Builder.CreateBitCast(Val5, Val6);
654
}
655
case ARM::BI__builtin_arm_cde_vcx1qa_s16:
656
case ARM::BI__builtin_arm_cde_vcx1qa_u16:
657
case ARM::BI__builtin_arm_cde_vcx2q_s16:
658
case ARM::BI__builtin_arm_cde_vcx2q_u16: {
659
  Intrinsic::ID  Param0;
660
  switch (BuiltinID) {
661
  case ARM::BI__builtin_arm_cde_vcx1qa_s16:
662
    Param0 = Intrinsic::arm_cde_vcx1qa;
663
    break;
664
  case ARM::BI__builtin_arm_cde_vcx1qa_u16:
665
    Param0 = Intrinsic::arm_cde_vcx1qa;
666
    break;
667
  case ARM::BI__builtin_arm_cde_vcx2q_s16:
668
    Param0 = Intrinsic::arm_cde_vcx2q;
669
    break;
670
  case ARM::BI__builtin_arm_cde_vcx2q_u16:
671
    Param0 = Intrinsic::arm_cde_vcx2q;
672
    break;
673
  }
674
  Value *Val0 = EmitScalarExpr(E->getArg(0));
675
  Value *Val1 = EmitScalarExpr(E->getArg(1));
676
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
677
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
678
  Value *Val4 = EmitScalarExpr(E->getArg(2));
679
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4});
680
  llvm::Type *Val6 = llvm::FixedVectorType::get(Int16Ty, 8);
681
  return Builder.CreateBitCast(Val5, Val6);
682
}
683
case ARM::BI__builtin_arm_cde_vcx1qa_s32:
684
case ARM::BI__builtin_arm_cde_vcx1qa_u32:
685
case ARM::BI__builtin_arm_cde_vcx2q_s32:
686
case ARM::BI__builtin_arm_cde_vcx2q_u32: {
687
  Intrinsic::ID  Param0;
688
  switch (BuiltinID) {
689
  case ARM::BI__builtin_arm_cde_vcx1qa_s32:
690
    Param0 = Intrinsic::arm_cde_vcx1qa;
691
    break;
692
  case ARM::BI__builtin_arm_cde_vcx1qa_u32:
693
    Param0 = Intrinsic::arm_cde_vcx1qa;
694
    break;
695
  case ARM::BI__builtin_arm_cde_vcx2q_s32:
696
    Param0 = Intrinsic::arm_cde_vcx2q;
697
    break;
698
  case ARM::BI__builtin_arm_cde_vcx2q_u32:
699
    Param0 = Intrinsic::arm_cde_vcx2q;
700
    break;
701
  }
702
  Value *Val0 = EmitScalarExpr(E->getArg(0));
703
  Value *Val1 = EmitScalarExpr(E->getArg(1));
704
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
705
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
706
  Value *Val4 = EmitScalarExpr(E->getArg(2));
707
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4});
708
  llvm::Type *Val6 = llvm::FixedVectorType::get(Int32Ty, 4);
709
  return Builder.CreateBitCast(Val5, Val6);
710
}
711
case ARM::BI__builtin_arm_cde_vcx1qa_s64:
712
case ARM::BI__builtin_arm_cde_vcx1qa_u64:
713
case ARM::BI__builtin_arm_cde_vcx2q_s64:
714
case ARM::BI__builtin_arm_cde_vcx2q_u64: {
715
  Intrinsic::ID  Param0;
716
  switch (BuiltinID) {
717
  case ARM::BI__builtin_arm_cde_vcx1qa_s64:
718
    Param0 = Intrinsic::arm_cde_vcx1qa;
719
    break;
720
  case ARM::BI__builtin_arm_cde_vcx1qa_u64:
721
    Param0 = Intrinsic::arm_cde_vcx1qa;
722
    break;
723
  case ARM::BI__builtin_arm_cde_vcx2q_s64:
724
    Param0 = Intrinsic::arm_cde_vcx2q;
725
    break;
726
  case ARM::BI__builtin_arm_cde_vcx2q_u64:
727
    Param0 = Intrinsic::arm_cde_vcx2q;
728
    break;
729
  }
730
  Value *Val0 = EmitScalarExpr(E->getArg(0));
731
  Value *Val1 = EmitScalarExpr(E->getArg(1));
732
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
733
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
734
  Value *Val4 = EmitScalarExpr(E->getArg(2));
735
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4});
736
  llvm::Type *Val6 = llvm::FixedVectorType::get(Int64Ty, 2);
737
  return Builder.CreateBitCast(Val5, Val6);
738
}
739
case ARM::BI__builtin_arm_cde_vcx1qa_s8:
740
case ARM::BI__builtin_arm_cde_vcx1qa_u8:
741
case ARM::BI__builtin_arm_cde_vcx2q_s8:
742
case ARM::BI__builtin_arm_cde_vcx2q_u8: {
743
  Intrinsic::ID  Param0;
744
  switch (BuiltinID) {
745
  case ARM::BI__builtin_arm_cde_vcx1qa_s8:
746
    Param0 = Intrinsic::arm_cde_vcx1qa;
747
    break;
748
  case ARM::BI__builtin_arm_cde_vcx1qa_u8:
749
    Param0 = Intrinsic::arm_cde_vcx1qa;
750
    break;
751
  case ARM::BI__builtin_arm_cde_vcx2q_s8:
752
    Param0 = Intrinsic::arm_cde_vcx2q;
753
    break;
754
  case ARM::BI__builtin_arm_cde_vcx2q_u8:
755
    Param0 = Intrinsic::arm_cde_vcx2q;
756
    break;
757
  }
758
  Value *Val0 = EmitScalarExpr(E->getArg(0));
759
  Value *Val1 = EmitScalarExpr(E->getArg(1));
760
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
761
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
762
  Value *Val4 = EmitScalarExpr(E->getArg(2));
763
  Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4});
764
  llvm::Type *Val6 = llvm::FixedVectorType::get(Int8Ty, 16);
765
  return Builder.CreateBitCast(Val5, Val6);
766
}
767
case ARM::BI__builtin_arm_cde_vcx2qa_impl_f32:
768
case ARM::BI__builtin_arm_cde_vcx3q_impl_f32: {
769
  Intrinsic::ID  Param0;
770
  switch (BuiltinID) {
771
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_f32:
772
    Param0 = Intrinsic::arm_cde_vcx2qa;
773
    break;
774
  case ARM::BI__builtin_arm_cde_vcx3q_impl_f32:
775
    Param0 = Intrinsic::arm_cde_vcx3q;
776
    break;
777
  }
778
  Value *Val0 = EmitScalarExpr(E->getArg(0));
779
  Value *Val1 = EmitScalarExpr(E->getArg(1));
780
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
781
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
782
  Value *Val4 = EmitScalarExpr(E->getArg(2));
783
  Value *Val5 = EmitScalarExpr(E->getArg(3));
784
  Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4, Val5});
785
  llvm::Type *Val7 = llvm::FixedVectorType::get(FloatTy, 4);
786
  return Builder.CreateBitCast(Val6, Val7);
787
}
788
case ARM::BI__builtin_arm_cde_vcx2qa_impl_f16:
789
case ARM::BI__builtin_arm_cde_vcx3q_impl_f16: {
790
  Intrinsic::ID  Param0;
791
  switch (BuiltinID) {
792
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_f16:
793
    Param0 = Intrinsic::arm_cde_vcx2qa;
794
    break;
795
  case ARM::BI__builtin_arm_cde_vcx3q_impl_f16:
796
    Param0 = Intrinsic::arm_cde_vcx3q;
797
    break;
798
  }
799
  Value *Val0 = EmitScalarExpr(E->getArg(0));
800
  Value *Val1 = EmitScalarExpr(E->getArg(1));
801
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
802
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
803
  Value *Val4 = EmitScalarExpr(E->getArg(2));
804
  Value *Val5 = EmitScalarExpr(E->getArg(3));
805
  Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4, Val5});
806
  llvm::Type *Val7 = llvm::FixedVectorType::get(HalfTy, 8);
807
  return Builder.CreateBitCast(Val6, Val7);
808
}
809
case ARM::BI__builtin_arm_cde_vcx2qa_impl_s16:
810
case ARM::BI__builtin_arm_cde_vcx2qa_impl_u16:
811
case ARM::BI__builtin_arm_cde_vcx3q_impl_s16:
812
case ARM::BI__builtin_arm_cde_vcx3q_impl_u16: {
813
  Intrinsic::ID  Param0;
814
  switch (BuiltinID) {
815
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_s16:
816
    Param0 = Intrinsic::arm_cde_vcx2qa;
817
    break;
818
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_u16:
819
    Param0 = Intrinsic::arm_cde_vcx2qa;
820
    break;
821
  case ARM::BI__builtin_arm_cde_vcx3q_impl_s16:
822
    Param0 = Intrinsic::arm_cde_vcx3q;
823
    break;
824
  case ARM::BI__builtin_arm_cde_vcx3q_impl_u16:
825
    Param0 = Intrinsic::arm_cde_vcx3q;
826
    break;
827
  }
828
  Value *Val0 = EmitScalarExpr(E->getArg(0));
829
  Value *Val1 = EmitScalarExpr(E->getArg(1));
830
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
831
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
832
  Value *Val4 = EmitScalarExpr(E->getArg(2));
833
  Value *Val5 = EmitScalarExpr(E->getArg(3));
834
  Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4, Val5});
835
  llvm::Type *Val7 = llvm::FixedVectorType::get(Int16Ty, 8);
836
  return Builder.CreateBitCast(Val6, Val7);
837
}
838
case ARM::BI__builtin_arm_cde_vcx2qa_impl_s32:
839
case ARM::BI__builtin_arm_cde_vcx2qa_impl_u32:
840
case ARM::BI__builtin_arm_cde_vcx3q_impl_s32:
841
case ARM::BI__builtin_arm_cde_vcx3q_impl_u32: {
842
  Intrinsic::ID  Param0;
843
  switch (BuiltinID) {
844
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_s32:
845
    Param0 = Intrinsic::arm_cde_vcx2qa;
846
    break;
847
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_u32:
848
    Param0 = Intrinsic::arm_cde_vcx2qa;
849
    break;
850
  case ARM::BI__builtin_arm_cde_vcx3q_impl_s32:
851
    Param0 = Intrinsic::arm_cde_vcx3q;
852
    break;
853
  case ARM::BI__builtin_arm_cde_vcx3q_impl_u32:
854
    Param0 = Intrinsic::arm_cde_vcx3q;
855
    break;
856
  }
857
  Value *Val0 = EmitScalarExpr(E->getArg(0));
858
  Value *Val1 = EmitScalarExpr(E->getArg(1));
859
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
860
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
861
  Value *Val4 = EmitScalarExpr(E->getArg(2));
862
  Value *Val5 = EmitScalarExpr(E->getArg(3));
863
  Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4, Val5});
864
  llvm::Type *Val7 = llvm::FixedVectorType::get(Int32Ty, 4);
865
  return Builder.CreateBitCast(Val6, Val7);
866
}
867
case ARM::BI__builtin_arm_cde_vcx2qa_impl_s64:
868
case ARM::BI__builtin_arm_cde_vcx2qa_impl_u64:
869
case ARM::BI__builtin_arm_cde_vcx3q_impl_s64:
870
case ARM::BI__builtin_arm_cde_vcx3q_impl_u64: {
871
  Intrinsic::ID  Param0;
872
  switch (BuiltinID) {
873
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_s64:
874
    Param0 = Intrinsic::arm_cde_vcx2qa;
875
    break;
876
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_u64:
877
    Param0 = Intrinsic::arm_cde_vcx2qa;
878
    break;
879
  case ARM::BI__builtin_arm_cde_vcx3q_impl_s64:
880
    Param0 = Intrinsic::arm_cde_vcx3q;
881
    break;
882
  case ARM::BI__builtin_arm_cde_vcx3q_impl_u64:
883
    Param0 = Intrinsic::arm_cde_vcx3q;
884
    break;
885
  }
886
  Value *Val0 = EmitScalarExpr(E->getArg(0));
887
  Value *Val1 = EmitScalarExpr(E->getArg(1));
888
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
889
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
890
  Value *Val4 = EmitScalarExpr(E->getArg(2));
891
  Value *Val5 = EmitScalarExpr(E->getArg(3));
892
  Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4, Val5});
893
  llvm::Type *Val7 = llvm::FixedVectorType::get(Int64Ty, 2);
894
  return Builder.CreateBitCast(Val6, Val7);
895
}
896
case ARM::BI__builtin_arm_cde_vcx2qa_impl_s8:
897
case ARM::BI__builtin_arm_cde_vcx2qa_impl_u8:
898
case ARM::BI__builtin_arm_cde_vcx3q_impl_s8:
899
case ARM::BI__builtin_arm_cde_vcx3q_impl_u8: {
900
  Intrinsic::ID  Param0;
901
  switch (BuiltinID) {
902
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_s8:
903
    Param0 = Intrinsic::arm_cde_vcx2qa;
904
    break;
905
  case ARM::BI__builtin_arm_cde_vcx2qa_impl_u8:
906
    Param0 = Intrinsic::arm_cde_vcx2qa;
907
    break;
908
  case ARM::BI__builtin_arm_cde_vcx3q_impl_s8:
909
    Param0 = Intrinsic::arm_cde_vcx3q;
910
    break;
911
  case ARM::BI__builtin_arm_cde_vcx3q_impl_u8:
912
    Param0 = Intrinsic::arm_cde_vcx3q;
913
    break;
914
  }
915
  Value *Val0 = EmitScalarExpr(E->getArg(0));
916
  Value *Val1 = EmitScalarExpr(E->getArg(1));
917
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
918
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
919
  Value *Val4 = EmitScalarExpr(E->getArg(2));
920
  Value *Val5 = EmitScalarExpr(E->getArg(3));
921
  Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val3, Val4, Val5});
922
  llvm::Type *Val7 = llvm::FixedVectorType::get(Int8Ty, 16);
923
  return Builder.CreateBitCast(Val6, Val7);
924
}
925
case ARM::BI__builtin_arm_cde_vcx3qa_impl_f32: {
926
  Value *Val0 = EmitScalarExpr(E->getArg(0));
927
  Value *Val1 = EmitScalarExpr(E->getArg(1));
928
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
929
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
930
  Value *Val4 = EmitScalarExpr(E->getArg(2));
931
  Value *Val5 = EmitScalarExpr(E->getArg(3));
932
  Value *Val6 = EmitScalarExpr(E->getArg(4));
933
  Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3qa), {Val0, Val3, Val4, Val5, Val6});
934
  llvm::Type *Val8 = llvm::FixedVectorType::get(FloatTy, 4);
935
  return Builder.CreateBitCast(Val7, Val8);
936
}
937
case ARM::BI__builtin_arm_cde_vcx3qa_impl_f16: {
938
  Value *Val0 = EmitScalarExpr(E->getArg(0));
939
  Value *Val1 = EmitScalarExpr(E->getArg(1));
940
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
941
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
942
  Value *Val4 = EmitScalarExpr(E->getArg(2));
943
  Value *Val5 = EmitScalarExpr(E->getArg(3));
944
  Value *Val6 = EmitScalarExpr(E->getArg(4));
945
  Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3qa), {Val0, Val3, Val4, Val5, Val6});
946
  llvm::Type *Val8 = llvm::FixedVectorType::get(HalfTy, 8);
947
  return Builder.CreateBitCast(Val7, Val8);
948
}
949
case ARM::BI__builtin_arm_cde_vcx3qa_impl_s16:
950
case ARM::BI__builtin_arm_cde_vcx3qa_impl_u16: {
951
  Value *Val0 = EmitScalarExpr(E->getArg(0));
952
  Value *Val1 = EmitScalarExpr(E->getArg(1));
953
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
954
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
955
  Value *Val4 = EmitScalarExpr(E->getArg(2));
956
  Value *Val5 = EmitScalarExpr(E->getArg(3));
957
  Value *Val6 = EmitScalarExpr(E->getArg(4));
958
  Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3qa), {Val0, Val3, Val4, Val5, Val6});
959
  llvm::Type *Val8 = llvm::FixedVectorType::get(Int16Ty, 8);
960
  return Builder.CreateBitCast(Val7, Val8);
961
}
962
case ARM::BI__builtin_arm_cde_vcx3qa_impl_s32:
963
case ARM::BI__builtin_arm_cde_vcx3qa_impl_u32: {
964
  Value *Val0 = EmitScalarExpr(E->getArg(0));
965
  Value *Val1 = EmitScalarExpr(E->getArg(1));
966
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
967
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
968
  Value *Val4 = EmitScalarExpr(E->getArg(2));
969
  Value *Val5 = EmitScalarExpr(E->getArg(3));
970
  Value *Val6 = EmitScalarExpr(E->getArg(4));
971
  Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3qa), {Val0, Val3, Val4, Val5, Val6});
972
  llvm::Type *Val8 = llvm::FixedVectorType::get(Int32Ty, 4);
973
  return Builder.CreateBitCast(Val7, Val8);
974
}
975
case ARM::BI__builtin_arm_cde_vcx3qa_impl_s64:
976
case ARM::BI__builtin_arm_cde_vcx3qa_impl_u64: {
977
  Value *Val0 = EmitScalarExpr(E->getArg(0));
978
  Value *Val1 = EmitScalarExpr(E->getArg(1));
979
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
980
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
981
  Value *Val4 = EmitScalarExpr(E->getArg(2));
982
  Value *Val5 = EmitScalarExpr(E->getArg(3));
983
  Value *Val6 = EmitScalarExpr(E->getArg(4));
984
  Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3qa), {Val0, Val3, Val4, Val5, Val6});
985
  llvm::Type *Val8 = llvm::FixedVectorType::get(Int64Ty, 2);
986
  return Builder.CreateBitCast(Val7, Val8);
987
}
988
case ARM::BI__builtin_arm_cde_vcx3qa_impl_s8:
989
case ARM::BI__builtin_arm_cde_vcx3qa_impl_u8: {
990
  Value *Val0 = EmitScalarExpr(E->getArg(0));
991
  Value *Val1 = EmitScalarExpr(E->getArg(1));
992
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
993
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
994
  Value *Val4 = EmitScalarExpr(E->getArg(2));
995
  Value *Val5 = EmitScalarExpr(E->getArg(3));
996
  Value *Val6 = EmitScalarExpr(E->getArg(4));
997
  Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3qa), {Val0, Val3, Val4, Val5, Val6});
998
  llvm::Type *Val8 = llvm::FixedVectorType::get(Int8Ty, 16);
999
  return Builder.CreateBitCast(Val7, Val8);
1000
}
1001
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_f16:
1002
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_f32:
1003
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_s16:
1004
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_s32:
1005
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_s64:
1006
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_s8:
1007
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_u16:
1008
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_u32:
1009
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_u64:
1010
case ARM::BI__builtin_arm_cde_vcx3q_u8_impl_u8: {
1011
  Value *Val0 = EmitScalarExpr(E->getArg(0));
1012
  Value *Val1 = EmitScalarExpr(E->getArg(1));
1013
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
1014
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
1015
  Value *Val4 = EmitScalarExpr(E->getArg(2));
1016
  Value *Val5 = EmitScalarExpr(E->getArg(3));
1017
  return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx3q), {Val0, Val3, Val4, Val5});
1018
}
1019
case ARM::BI__builtin_arm_cde_vcx2q_u8_f16:
1020
case ARM::BI__builtin_arm_cde_vcx2q_u8_f32:
1021
case ARM::BI__builtin_arm_cde_vcx2q_u8_s16:
1022
case ARM::BI__builtin_arm_cde_vcx2q_u8_s32:
1023
case ARM::BI__builtin_arm_cde_vcx2q_u8_s64:
1024
case ARM::BI__builtin_arm_cde_vcx2q_u8_s8:
1025
case ARM::BI__builtin_arm_cde_vcx2q_u8_u16:
1026
case ARM::BI__builtin_arm_cde_vcx2q_u8_u32:
1027
case ARM::BI__builtin_arm_cde_vcx2q_u8_u64:
1028
case ARM::BI__builtin_arm_cde_vcx2q_u8_u8: {
1029
  Value *Val0 = EmitScalarExpr(E->getArg(0));
1030
  Value *Val1 = EmitScalarExpr(E->getArg(1));
1031
  llvm::Type *Val2 = llvm::FixedVectorType::get(Int8Ty, 16);
1032
  Value *Val3 = Builder.CreateBitCast(Val1, Val2);
1033
  Value *Val4 = EmitScalarExpr(E->getArg(2));
1034
  return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_vcx2q), {Val0, Val3, Val4});
1035
}
1036
case ARM::BI__builtin_arm_cde_cx1:
1037
case ARM::BI__builtin_arm_cde_vcx1q_u8: {
1038
  Intrinsic::ID  Param0;
1039
  switch (BuiltinID) {
1040
  case ARM::BI__builtin_arm_cde_cx1:
1041
    Param0 = Intrinsic::arm_cde_cx1;
1042
    break;
1043
  case ARM::BI__builtin_arm_cde_vcx1q_u8:
1044
    Param0 = Intrinsic::arm_cde_vcx1q;
1045
    break;
1046
  }
1047
  Value *Val0 = EmitScalarExpr(E->getArg(0));
1048
  Value *Val1 = EmitScalarExpr(E->getArg(1));
1049
  return Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0, Val1});
1050
}
1051
case ARM::BI__builtin_arm_cde_vreinterpretq_u8_u8: {
1052
  Value *Val0 = EmitScalarExpr(E->getArg(0));
1053
  return (Val0);
1054
}
1055
case ARM::BI__builtin_arm_cde_cx1da: {
1056
  Value *Val0 = EmitScalarExpr(E->getArg(1));
1057
  Value *Val1 = llvm::ConstantInt::get(Int64Ty, 32);
1058
  Value *Val2 = Builder.CreateLShr(Val0, Val1);
1059
  Value *Val3 = Builder.CreateIntCast(Val2, Int32Ty, false);
1060
  Value *Val4 = Builder.CreateIntCast(Val0, Int32Ty, false);
1061
  Value *Val5 = EmitScalarExpr(E->getArg(0));
1062
  Value *Val6 = EmitScalarExpr(E->getArg(2));
1063
  Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_cx1da), {Val5, Val4, Val3, Val6});
1064
  Value *Val8 = Builder.CreateExtractValue(Val7, static_cast<unsigned>(1));
1065
  Value *Val9 = Builder.CreateIntCast(Val8, Int64Ty, false);
1066
  Value *Val10 = llvm::ConstantInt::get(Int64Ty, 32);
1067
  Value *Val11 = Builder.CreateShl(Val9, Val10);
1068
  Value *Val12 = Builder.CreateExtractValue(Val7, static_cast<unsigned>(0));
1069
  Value *Val13 = Builder.CreateIntCast(Val12, Int64Ty, false);
1070
  return Builder.CreateOr(Val11, Val13);
1071
}
1072
case ARM::BI__builtin_arm_cde_cx2da: {
1073
  Value *Val0 = EmitScalarExpr(E->getArg(1));
1074
  Value *Val1 = llvm::ConstantInt::get(Int64Ty, 32);
1075
  Value *Val2 = Builder.CreateLShr(Val0, Val1);
1076
  Value *Val3 = Builder.CreateIntCast(Val2, Int32Ty, false);
1077
  Value *Val4 = Builder.CreateIntCast(Val0, Int32Ty, false);
1078
  Value *Val5 = EmitScalarExpr(E->getArg(0));
1079
  Value *Val6 = EmitScalarExpr(E->getArg(2));
1080
  Value *Val7 = EmitScalarExpr(E->getArg(3));
1081
  Value *Val8 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_cx2da), {Val5, Val4, Val3, Val6, Val7});
1082
  Value *Val9 = Builder.CreateExtractValue(Val8, static_cast<unsigned>(1));
1083
  Value *Val10 = Builder.CreateIntCast(Val9, Int64Ty, false);
1084
  Value *Val11 = llvm::ConstantInt::get(Int64Ty, 32);
1085
  Value *Val12 = Builder.CreateShl(Val10, Val11);
1086
  Value *Val13 = Builder.CreateExtractValue(Val8, static_cast<unsigned>(0));
1087
  Value *Val14 = Builder.CreateIntCast(Val13, Int64Ty, false);
1088
  return Builder.CreateOr(Val12, Val14);
1089
}
1090
case ARM::BI__builtin_arm_cde_cx3da: {
1091
  Value *Val0 = EmitScalarExpr(E->getArg(1));
1092
  Value *Val1 = llvm::ConstantInt::get(Int64Ty, 32);
1093
  Value *Val2 = Builder.CreateLShr(Val0, Val1);
1094
  Value *Val3 = Builder.CreateIntCast(Val2, Int32Ty, false);
1095
  Value *Val4 = Builder.CreateIntCast(Val0, Int32Ty, false);
1096
  Value *Val5 = EmitScalarExpr(E->getArg(0));
1097
  Value *Val6 = EmitScalarExpr(E->getArg(2));
1098
  Value *Val7 = EmitScalarExpr(E->getArg(3));
1099
  Value *Val8 = EmitScalarExpr(E->getArg(4));
1100
  Value *Val9 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_cde_cx3da), {Val5, Val4, Val3, Val6, Val7, Val8});
1101
  Value *Val10 = Builder.CreateExtractValue(Val9, static_cast<unsigned>(1));
1102
  Value *Val11 = Builder.CreateIntCast(Val10, Int64Ty, false);
1103
  Value *Val12 = llvm::ConstantInt::get(Int64Ty, 32);
1104
  Value *Val13 = Builder.CreateShl(Val11, Val12);
1105
  Value *Val14 = Builder.CreateExtractValue(Val9, static_cast<unsigned>(0));
1106
  Value *Val15 = Builder.CreateIntCast(Val14, Int64Ty, false);
1107
  return Builder.CreateOr(Val13, Val15);
1108
}