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
- Repository
- rL LLVM
Event Timeline
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | ||
---|---|---|
977–978 ↗ | (On Diff #48150) | 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 ↗ | (On Diff #48158) | 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 | ||
---|---|---|
975–976 ↗ | (On Diff #48218) | 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?