[PATCH] D112004: [SystemZ] Improve codegen for memset
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 27 06:16:52 PDT 2021
uweigand added a comment.
I think it would be a bit simpler and clearer to handle the Src vs. Dest address special case for memset in a single place at the beginning. Something along the lines of:
if (!isMemSet)
{
DestBase = earlyUseOperand(MI.getOperand(0));
DestDisp = MI.getOperand(1).getImm();
SrcBase = earlyUseOperand(MI.getOperand(2));
SrcDisp = MI.getOperand(3).getImm();
}
else
{
SrcBase = earlyUseOperand(MI.getOperand(0));
SrcDisp = MI.getOperand(1).getImm();
DestBase = SrcBase;
DestDisp = SrcDisp + 1;
foldDisplIfNeeded(DestBase, DestDisp);
}
There should be no need for any subsequent +1 displacement arithmetic then.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112004/new/
https://reviews.llvm.org/D112004
More information about the llvm-commits
mailing list