aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_proc.cpp
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-08-06 14:50:34 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-08-06 14:50:34 -0400
commite27a424f4d88a0409e6492ab167dbe5a82b9e3ac (patch)
tree4fe9b081398db5c8de51d0bc3a635e64ea0b13fb /src/llvm_backend_proc.cpp
parent7a367c9c08639ded09b342714e02bdbc82ecb604 (diff)
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.
Diffstat (limited to 'src/llvm_backend_proc.cpp')
-rw-r--r--src/llvm_backend_proc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp
index ceaeb1aca..ee3ed1995 100644
--- a/src/llvm_backend_proc.cpp
+++ b/src/llvm_backend_proc.cpp
@@ -1532,8 +1532,8 @@ gb_internal lbValue lb_build_builtin_simd_proc(lbProcedure *p, Ast *expr, TypeAn
{
char const *name = nullptr;
switch (builtin_id) {
- case BuiltinProc_simd_reduce_any: name = "llvm.vector.reduce.and"; break;
- case BuiltinProc_simd_reduce_all: name = "llvm.vector.reduce.or"; break;
+ case BuiltinProc_simd_reduce_any: 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) };