[PATCH] D75266: SROA: Don't drop atomic load/store alignments (PR45010)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 09:12:42 PST 2020
efriedma added a comment.
I would prefer to just avoid creating unaligned allocas in the first place. https://github.com/llvm/llvm-project/blob/740ed617f7d4d16e7883636c5eff994f8be7eba4/llvm/lib/Transforms/Scalar/SROA.cpp#L4163 has some code which intentionally uses an unspecified alignment... but really, there's no reason to do that. allocas with no specified alignment are implicitly aligned using the ABI type alignment. So it's semantically equivalent to `std::max(Alignment, DL.getABITypeAlignment(SliceTy)`, just more annoying to deal with.
Really, the alignment of load/store/alloca shouldn't be a MaybeAlign in the first place, but someone needs to go through and clean up a bunch of places to make that happen.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75266/new/
https://reviews.llvm.org/D75266
More information about the llvm-commits
mailing list