diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-08-26 04:48:31 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-08-26 04:48:31 -0400 |
| commit | c424c940303b497f694ed2246adb1a7b97ff6d9b (patch) | |
| tree | 2537e0e110f75f5a13d7fd3590dfb0ea910ffbe9 /src/llvm_backend_utility.cpp | |
| parent | 8de1e88c4f34f79ff8e2eac915507a30c185236e (diff) | |
Fix inline transmutation of `[16]i8` to `i128`
Forbids LLVM from generating SSE aligned loads on unaligned data.
Diffstat (limited to 'src/llvm_backend_utility.cpp')
| -rw-r--r-- | src/llvm_backend_utility.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp index 68c1e9d1e..f63c42ab9 100644 --- a/src/llvm_backend_utility.cpp +++ b/src/llvm_backend_utility.cpp @@ -263,7 +263,7 @@ gb_internal lbValue lb_emit_transmute(lbProcedure *p, lbValue value, Type *t) { if (is_type_simd_vector(src) && is_type_simd_vector(dst)) { res.value = LLVMBuildBitCast(p->builder, value.value, lb_type(p->module, t), ""); return res; - } else if (is_type_array_like(src) && is_type_simd_vector(dst)) { + } else if (is_type_array_like(src) && (is_type_simd_vector(dst) || is_type_integer_128bit(dst))) { unsigned align = cast(unsigned)gb_max(type_align_of(src), type_align_of(dst)); lbValue ptr = lb_address_from_load_or_generate_local(p, value); if (lb_try_update_alignment(ptr, align)) { |