mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-10 06:45:47 -04:00
fixes simd gather/scatter and masked load/store randomly crashing the compiler
This commit is contained in:
1 parent
17cbeb68cf
commit
d5db73dc06
1 file changed
+3
-3
@@ -2896,7 +2896,7 @@ gb_internal lbValue lb_build_builtin_simd_proc(lbProcedure *p, Ast *expr, TypeAn
|
||||
case BuiltinProc_simd_gather:
|
||||
if (LLVM_VERSION_MAJOR >= 22) {
|
||||
arg_count = 3;
|
||||
args[0] = ptr; align_idx = 0;
|
||||
args[0] = ptr; align_idx = 1;
|
||||
args[1] = mask;
|
||||
args[2] = val;
|
||||
} else {
|
||||
@@ -2914,7 +2914,7 @@ gb_internal lbValue lb_build_builtin_simd_proc(lbProcedure *p, Ast *expr, TypeAn
|
||||
if (LLVM_VERSION_MAJOR >= 22) {
|
||||
arg_count = 3;
|
||||
args[0] = val;
|
||||
args[1] = ptr; align_idx = 1;
|
||||
args[1] = ptr; align_idx = 2;
|
||||
args[2] = mask;
|
||||
} else {
|
||||
args[0] = val;
|
||||
@@ -2944,7 +2944,7 @@ gb_internal lbValue lb_build_builtin_simd_proc(lbProcedure *p, Ast *expr, TypeAn
|
||||
res.value = lb_call_intrinsic(p, name, args, arg_count, types, type_count);
|
||||
if (align_idx >= 0) {
|
||||
LLVMAttributeRef align_attr = lb_create_enum_attribute(p->module->ctx, "align", alignment);
|
||||
LLVMAddAttributeAtIndex(res.value, align_idx, align_attr);
|
||||
LLVMAddCallSiteAttribute(res.value, align_idx, align_attr);
|
||||
}
|
||||
return res;
|
||||
|
||||
|
||||
Reference in new issue
Block a user