[PATCH] D42974: [SROA] Take advantage of separate alignments for memcpy source and destination
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 12 14:02:57 PDT 2018
efriedma added a reviewer: efriedma.
efriedma added inline comments.
================
Comment at: lib/Transforms/Scalar/SROA.cpp:2701
II.setDest(getNewAllocaSlicePtr(IRB, OldPtr->getType()));
- II.setAlignment(getSliceAlign());
+ II.setDestAlignment(getSliceAlign());
----------------
Testcase?
================
Comment at: lib/Transforms/Scalar/SROA.cpp:2828
II.setSource(AdjustedPtr);
-
- if (II.getAlignment() > SliceAlign) {
- II.setAlignment(MinAlign(II.getAlignment(), SliceAlign));
+ II.setSourceAlignment(SliceAlign);
}
----------------
Testcase? (At least, at first glance it doesn't look like the memcpy tests cover this.)
================
Comment at: lib/Transforms/Scalar/SROA.cpp:2899
+ IsDest ? OtherPtr : OurPtr, IsDest ? OtherAlign : SliceAlign,
+ Size, II.isVolatile());
if (AATags)
----------------
All the checks for IsDest here are confusing... could you make explicit variables SrcPtr/DstPtr/SrcAlign/DstAlign?
Repository:
rL LLVM
https://reviews.llvm.org/D42974
More information about the llvm-commits
mailing list