authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-01 03:41:52+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-01 18:16:36+02:00
logaa7b32d78189a66bb1fb62fd9735be5d15651d5b
treeb9dc71265fe18e842c21bafd2ec765e38b5e5124
parent6b6e336e07308fd23f3061b5be11407956b2a460
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

llvm: Fix alignment of by-ref ptr_elem_val and slice_elem_val


1 files changed, 4 insertions(+), 4 deletions(-)

src/codegen/llvm.zig+4-4
......@@ -6831,8 +6831,8 @@ pub const FuncGen = struct {
68316831
68326832 self.maybeMarkAllowZeroAccess(slice_ty.ptrInfo(zcu));
68336833
6834 const elem_alignment = elem_ty.abiAlignment(zcu).toLlvm();
6835 return self.loadByRef(ptr, elem_ty, elem_alignment, if (slice_ty.isVolatilePtr(zcu)) .@"volatile" else .normal);
6834 const slice_align = (slice_ty.ptrAlignment(zcu).min(elem_ty.abiAlignment(zcu))).toLlvm();
6835 return self.loadByRef(ptr, elem_ty, slice_align, if (slice_ty.isVolatilePtr(zcu)) .@"volatile" else .normal);
68366836 }
68376837
68386838 self.maybeMarkAllowZeroAccess(slice_ty.ptrInfo(zcu));
......@@ -6909,8 +6909,8 @@ pub const FuncGen = struct {
69096909
69106910 self.maybeMarkAllowZeroAccess(ptr_ty.ptrInfo(zcu));
69116911
6912 const elem_alignment = elem_ty.abiAlignment(zcu).toLlvm();
6913 return self.loadByRef(ptr, elem_ty, elem_alignment, if (ptr_ty.isVolatilePtr(zcu)) .@"volatile" else .normal);
6912 const ptr_align = (ptr_ty.ptrAlignment(zcu).min(elem_ty.abiAlignment(zcu))).toLlvm();
6913 return self.loadByRef(ptr, elem_ty, ptr_align, if (ptr_ty.isVolatilePtr(zcu)) .@"volatile" else .normal);
69146914 }
69156915
69166916 self.maybeMarkAllowZeroAccess(ptr_ty.ptrInfo(zcu));