Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit dd96fc5

Browse files
committed
Implement more AVX/AVX2 intrinsics
1 parent e9e3377 commit dd96fc5

File tree

4 files changed

+38
-5
lines changed

4 files changed

+38
-5
lines changed

src/jit/emitxarch.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,12 @@ bool emitter::IsDstDstSrcAVXInstruction(instruction ins)
223223
case INS_unpcklpd:
224224
case INS_vinsertf128:
225225
case INS_vinserti128:
226+
case INS_vmaskmovps:
227+
case INS_vmaskmovpd:
226228
case INS_vperm2i128:
229+
case INS_vperm2f128:
230+
case INS_vpermilpsvar:
231+
case INS_vpermilpdvar:
227232
case INS_vpsrlvd:
228233
case INS_vpsrlvq:
229234
case INS_vpsravd:

src/jit/hwintrinsiccodegenxarch.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,14 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node)
134134
}
135135
else if (category == HW_Category_MemoryLoad)
136136
{
137-
emit->emitIns_SIMD_R_R_AR(ins, simdSize, targetReg, op1Reg, op2Reg);
137+
if (intrinsicID == NI_AVX_MaskLoad)
138+
{
139+
emit->emitIns_SIMD_R_R_AR(ins, simdSize, targetReg, op2Reg, op1Reg);
140+
}
141+
else
142+
{
143+
emit->emitIns_SIMD_R_R_AR(ins, simdSize, targetReg, op1Reg, op2Reg);
144+
}
138145
}
139146
else if (Compiler::isImmHWIntrinsic(intrinsicID, op2))
140147
{
@@ -1331,7 +1338,6 @@ void CodeGen::genAvxOrAvx2Intrinsic(GenTreeHWIntrinsic* node)
13311338

13321339
if (op1Reg != targetReg)
13331340
{
1334-
instruction ins = Compiler::insOfHWIntrinsic(intrinsicID, node->gtSIMDBaseType);
13351341
emit->emitIns_R_R(ins, emitTypeSize(TYP_SIMD32), targetReg, op1Reg);
13361342
}
13371343
break;

0 commit comments

Comments
 (0)