Skip to content

Commit f860ee2

Browse files
committed
Incorrect decomposition of simd calls
simd decomposition for OP_ARG cases for simd calls in handled incorrectly currently the decomposition intrinsic takes place based on a xcall but later on this xcall is decomposed into a vcall where the return register is removed. fixes #116287
1 parent 11d3c57 commit f860ee2

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/mono/mono/mini/simd-intrinsics.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6717,10 +6717,17 @@ mono_emit_common_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSi
67176717
static gboolean
67186718
decompose_vtype_opt_uses_simd_intrinsics (MonoCompile *cfg, MonoInst *ins)
67196719
{
6720-
if (cfg->uses_simd_intrinsics)
6721-
return TRUE;
6722-
6723-
switch (ins->opcode) {
6720+
switch (ins->opcode){
6721+
case OP_XCALL:
6722+
case OP_XCALL_REG:
6723+
case OP_XCALL_MEMBASE:
6724+
return FALSE
6725+
}
6726+
6727+
if (cfg->uses_simd_intrinsics)
6728+
return TRUE;
6729+
6730+
switch (ins->opcode) {
67246731
case OP_XMOVE:
67256732
case OP_XZERO:
67266733
case OP_XPHI:
@@ -6732,6 +6739,7 @@ decompose_vtype_opt_uses_simd_intrinsics (MonoCompile *cfg, MonoInst *ins)
67326739
default:
67336740
return FALSE;
67346741
}
6742+
67356743
}
67366744

67376745
static void

0 commit comments

Comments
 (0)