[llvm] Fix the mapping of simd types to llvm types when using -O=-simd.
authorZoltan Varga <vargaz@gmail.com>
Sat, 17 Dec 2016 12:08:09 +0000 (07:08 -0500)
committerZoltan Varga <vargaz@gmail.com>
Sat, 17 Dec 2016 12:08:09 +0000 (07:08 -0500)
mono/mini/mini-llvm.c

index 4635c585d1a22b46b1a297378283a15c3032134d..e1ef097db423acf9f60fdf5ed0c589f6bb3fcc28 100644 (file)
@@ -434,6 +434,9 @@ create_llvm_type_for_type (MonoLLVMModule *module, MonoClass *klass)
                 * This is needed on arm64 where HFAs are returned in
                 * registers.
                 */
+               /* SIMD types have size 16 in mono_class_value_size () */
+               if (klass->simd_type)
+                       nfields = 16/ esize;
                size = nfields;
                eltypes = g_new (LLVMTypeRef, size);
                for (i = 0; i < size; ++i)