Skip to content

Commit

Permalink
[mono][jit] Use MONO_CLASS_IS_SIMD () in more places to fix running w…
Browse files Browse the repository at this point in the history
…ith -O=-simd. (#72982)
  • Loading branch information
vargaz authored Jul 28, 2022
1 parent a8789a6 commit 8e1c9c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini-amd64.c
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)

if ((t->type == MONO_TYPE_GENERICINST) && !cfg->full_aot && !sig->pinvoke) {
MonoClass *klass = mono_class_from_mono_type_internal (t);
if (m_class_is_simd_type (klass)) {
if (MONO_CLASS_IS_SIMD (cfg, klass)) {
linfo->args [i].storage = LLVMArgVtypeInSIMDReg;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini-arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -2523,7 +2523,7 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
case ArgVtypeInIRegs:
if ((t->type == MONO_TYPE_GENERICINST) && !cfg->full_aot && !sig->pinvoke) {
MonoClass *klass = mono_class_from_mono_type_internal (t);
if (m_class_is_simd_type (klass)) {
if (MONO_CLASS_IS_SIMD (cfg, klass)) {
lainfo->storage = LLVMArgVtypeInSIMDReg;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini-llvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ create_llvm_type_for_type (MonoLLVMModule *module, MonoClass *klass)
*/
/* SIMD types have size 16 in mono_class_value_size () */
if (m_class_is_simd_type (klass))
nfields = 16/ esize;
nfields = 16 / esize;
size = nfields;
eltypes = g_new (LLVMTypeRef, size);
for (i = 0; i < size; ++i)
Expand Down

0 comments on commit 8e1c9c1

Please sign in to comment.