}
}
+static MonoTypeEnum
+inst_c1_type (const MonoInst *ins)
+{
+ return (MonoTypeEnum)ins->inst_c1;
+}
+
/*
* type_to_llvm_type:
*
}
case OP_SSE_LOADU: {
- LLVMValueRef dst_ptr = convert (ctx, lhs, LLVMPointerType (primitive_type_to_llvm_type (ins->inst_c1), 0));
+ LLVMValueRef dst_ptr = convert (ctx, lhs, LLVMPointerType (primitive_type_to_llvm_type (inst_c1_type (ins)), 0));
LLVMValueRef dst_vec = LLVMBuildBitCast (builder, dst_ptr, LLVMPointerType (type_to_simd_type (ins->inst_c1), 0), "");
values [ins->dreg] = mono_llvm_build_aligned_load (builder, dst_vec, "", FALSE, ins->inst_c0); // inst_c0 is alignment
break;
case OP_CREATE_SCALAR_UNSAFE: {
values [ins->dreg] = LLVMBuildInsertElement (builder,
LLVMGetUndef (simd_class_to_llvm_type (ctx, ins->klass)),
- convert (ctx, lhs, primitive_type_to_llvm_type (ins->inst_c1)),
+ convert (ctx, lhs, primitive_type_to_llvm_type (inst_c1_type (ins))),
LLVMConstInt (LLVMInt32Type (), 0, FALSE), "");
break;
}
// other overloads are implemented with `insertelement`
values [ins->dreg] = LLVMBuildInsertElement (builder,
values [ins->sreg1],
- convert (ctx, values [ins->sreg2], primitive_type_to_llvm_type (ins->inst_c1)),
+ convert (ctx, values [ins->sreg2], primitive_type_to_llvm_type (inst_c1_type (ins))),
convert (ctx, values [ins->sreg3], LLVMInt8Type ()), dname);
}
break;