[PATCH] D102552: [GlobalOpt] recompute alignments for loads and stores of updated globals

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 15 06:05:21 PDT 2021


lebedev.ri added a comment.

I think the bug is the other way around. For each scalar we are going to split off of aggregate,
we should first determine the alignment for scalar by determining what largest legal alignment
could it had as part of the aggregate (based on the alignment of the outer type, and offset).
Then, we shouldn't //need// to update uses, because by then we didn't change the alignment,
and if any use overestimated it, then it is, and was, UB.

Otherwise, aren't we going to loose overalignment of the aggregate scalars?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102552/new/

https://reviews.llvm.org/D102552



More information about the llvm-commits mailing list