[PATCH] D36841: [SimplifyCFG] Fix for PR34219: Preserve alignment after merging conditional stores.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 13:02:55 PDT 2017


ABataev added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2972
+  if (unsigned Alignment = PStore->getAlignment())
+    SI->setAlignment(Alignment);
 
----------------
efriedma wrote:
> ABataev wrote:
> > efriedma wrote:
> > > What happens if PStore and QStore have different alignment?
> > Generally speaking, they must be the same.
> I don't see any code to ensure they are the same.  (Or do you mean we shouldn't do this transform if the alignment is different?)
Actually, PStore and QStore work with the same values, so they must have the same alignment because it is the same operations. We just merge them into the single one. I'm not sure, if they may have the different alignments. If they may have the different alignments, we can choose the one that is greater.


https://reviews.llvm.org/D36841





More information about the llvm-commits mailing list