aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-01-29 13:07:37 -0800
committerGitHub <noreply@github.com>2024-01-29 13:07:37 -0800
commitf4f8036ec048daa072c7caa72edd320c85bf426c (patch)
treeb0ab4a567d57e1d562c950c98e810b420ea4f723 /src/codegen
parent3e939e61538706f37abb76a97af0ee77c15b24fc (diff)
parent78e982f7c3e8a441259d26a69690d8934dd32bf0 (diff)
downloadzig-f4f8036ec048daa072c7caa72edd320c85bf426c.tar.gz
zig-f4f8036ec048daa072c7caa72edd320c85bf426c.zip
Merge pull request #18729 from Vexu/fixes
Fix some generic{Reader,Writer} related issues
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index f01c27042b..5cbcf6b3d6 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -8694,10 +8694,10 @@ pub const FuncGen = struct {
if (!result_is_ref) {
return self.dg.todo("implement bitcast vector to non-ref array", .{});
}
- const array_ptr = try self.buildAllocaWorkaround(inst_ty, .default);
+ const alignment = inst_ty.abiAlignment(mod).toLlvm();
+ const array_ptr = try self.buildAllocaWorkaround(inst_ty, alignment);
const bitcast_ok = elem_ty.bitSize(mod) == elem_ty.abiSize(mod) * 8;
if (bitcast_ok) {
- const alignment = inst_ty.abiAlignment(mod).toLlvm();
_ = try self.wip.store(.normal, operand, array_ptr, alignment);
} else {
// If the ABI size of the element type is not evenly divisible by size in bits;