From 231851a3252cc994f107267bf767ef956fa40633 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Thu, 28 Jul 2022 00:02:40 -0400 Subject: [PATCH] [mono][jit] Use MONO_CLASS_IS_SIMD () in more places to fix running with -O=-simd. --- src/mono/mono/mini/mini-amd64.c | 2 +- src/mono/mono/mini/mini-arm64.c | 2 +- src/mono/mono/mini/mini-llvm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mono/mono/mini/mini-amd64.c b/src/mono/mono/mini/mini-amd64.c index aa60685fe440a..2daf4adc859b7 100644 --- a/src/mono/mono/mini/mini-amd64.c +++ b/src/mono/mono/mini/mini-amd64.c @@ -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; } diff --git a/src/mono/mono/mini/mini-arm64.c b/src/mono/mono/mini/mini-arm64.c index 402d83a8a4f35..081e5bc151aec 100644 --- a/src/mono/mono/mini/mini-arm64.c +++ b/src/mono/mono/mini/mini-arm64.c @@ -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; } diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index 75bc7e2c9144c..b5bcff6d6e2b0 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -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)