@@ -216,6 +216,16 @@ using BinaryVPInstruction_match =
216
216
BinaryRecipe_match<Op0_t, Op1_t, Opcode, /* Commutative*/ false ,
217
217
VPInstruction>;
218
218
219
+ template <typename Op0_t, typename Op1_t, typename Op2_t, unsigned Opcode,
220
+ bool Commutative, typename ... RecipeTys>
221
+ using TernaryRecipe_match = Recipe_match<std::tuple<Op0_t, Op1_t, Op2_t>,
222
+ Opcode, Commutative, RecipeTys...>;
223
+
224
+ template <typename Op0_t, typename Op1_t, typename Op2_t, unsigned Opcode>
225
+ using TernaryVPInstruction_match =
226
+ TernaryRecipe_match<Op0_t, Op1_t, Op2_t, Opcode, /* Commutative*/ false ,
227
+ VPInstruction>;
228
+
219
229
template <typename Op0_t, typename Op1_t, unsigned Opcode,
220
230
bool Commutative = false >
221
231
using AllBinaryRecipe_match =
@@ -234,6 +244,13 @@ m_VPInstruction(const Op0_t &Op0, const Op1_t &Op1) {
234
244
return BinaryVPInstruction_match<Op0_t, Op1_t, Opcode>(Op0, Op1);
235
245
}
236
246
247
+ template <unsigned Opcode, typename Op0_t, typename Op1_t, typename Op2_t>
248
+ inline TernaryVPInstruction_match<Op0_t, Op1_t, Op2_t, Opcode>
249
+ m_VPInstruction (const Op0_t &Op0, const Op1_t &Op1, const Op2_t &Op2) {
250
+ return TernaryVPInstruction_match<Op0_t, Op1_t, Op2_t, Opcode>(
251
+ {Op0, Op1, Op2});
252
+ }
253
+
237
254
template <typename Op0_t>
238
255
inline UnaryVPInstruction_match<Op0_t, VPInstruction::Not>
239
256
m_Not (const Op0_t &Op0) {
0 commit comments