Skip to content

Commit 92f03a4

Browse files
committed
Revert "Make sure we don't promise alignments that are larger than the heap alignment to LLVM (#56938)"
This reverts commit 09704c7.
1 parent 4226f1e commit 92f03a4

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

src/codegen.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -7715,8 +7715,6 @@ static jl_llvm_functions_t
77157715
Type *RT = Arg->getParamStructRetType();
77167716
TypeSize sz = DL.getTypeAllocSize(RT);
77177717
Align al = DL.getPrefTypeAlign(RT);
7718-
if (al > MAX_ALIGN)
7719-
al = Align(MAX_ALIGN);
77207718
param.addAttribute(Attribute::NonNull);
77217719
// The `dereferenceable` below does not imply `nonnull` for non addrspace(0) pointers.
77227720
param.addDereferenceableAttr(sz);

src/datatype.c

-2
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,6 @@ void jl_compute_field_offsets(jl_datatype_t *st)
648648
if (al > alignm)
649649
alignm = al;
650650
}
651-
if (alignm > MAX_ALIGN)
652-
alignm = MAX_ALIGN; // We cannot guarantee alignments over 16 bytes because that's what our heap is aligned as
653651
if (LLT_ALIGN(sz, alignm) > sz) {
654652
haspadding = 1;
655653
sz = LLT_ALIGN(sz, alignm);

test/compiler/codegen.jl

-6
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,3 @@ end
873873

874874
# Core.getptls() special handling
875875
@test !occursin("call ptr @jlplt", get_llvm(Core.getptls, Tuple{})) #It should lower to a direct load of the ptls and not a ccall
876-
877-
878-
struct Vec56937 x::NTuple{8, VecElement{Int}} end
879-
880-
x56937 = Ref(Vec56937(ntuple(_->VecElement(1),8)))
881-
@test x56937[].x[1] == VecElement{Int}(1) # shouldn't crash

0 commit comments

Comments
 (0)