mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Swap reduce_any and reduce_all
`llvm.vector.reduce.or` will return true if any lane is true. `llvm.vector.reduce.and` will return true if all lanes are true.
This commit is contained in:
@@ -1532,8 +1532,8 @@ gb_internal lbValue lb_build_builtin_simd_proc(lbProcedure *p, Ast *expr, TypeAn
|
|||||||
{
|
{
|
||||||
char const *name = nullptr;
|
char const *name = nullptr;
|
||||||
switch (builtin_id) {
|
switch (builtin_id) {
|
||||||
case BuiltinProc_simd_reduce_any: name = "llvm.vector.reduce.and"; break;
|
case BuiltinProc_simd_reduce_any: name = "llvm.vector.reduce.or"; break;
|
||||||
case BuiltinProc_simd_reduce_all: name = "llvm.vector.reduce.or"; break;
|
case BuiltinProc_simd_reduce_all: name = "llvm.vector.reduce.and"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMTypeRef types[1] = { lb_type(p->module, arg0.type) };
|
LLVMTypeRef types[1] = { lb_type(p->module, arg0.type) };
|
||||||
|
|||||||
Reference in New Issue
Block a user