Store and loads unpacked by instcombine do not always have the right alignement. This explicitely compute the alignement and set it.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | ||
---|---|---|
976–978 | Would MinAlign from MathExtras work here? I'm thinking MinAlign(SL->getElementOffset(i), Align). |
Comment Actions
Actually, some last minute questions came up...
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | ||
---|---|---|
548 | I think it'd be more obvious if you used DL.getABITypeAlignment(ST) here seeing as how the langref defines the load's alignment using the language: A value of 0 or an omitted align argument means that the operation has the ABI alignment for the target. |
Comment Actions
LGTM
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | ||
---|---|---|
974–975 | Is this clang-formatted? |
Comment Actions
Looks like http://reviews.llvm.org/D17158 is backported to 3.8.0 and is causing a segfault. Could this one be backported too?
I think it'd be more obvious if you used DL.getABITypeAlignment(ST) here seeing as how the langref defines the load's alignment using the language: A value of 0 or an omitted align argument means that the operation has the ABI alignment for the target.