[PATCH] D137201: [AggressiveInstCombine] Handle the insert point of the merged load correctly.
Biplob Mishra via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 07:52:04 PST 2022
bipmis added inline comments.
================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:828
+ Instruction *Inst = dyn_cast<Instruction>(LI1->getPointerOperand());
+ if (Inst && Inst->getParent() != LI1->getParent())
+ return false;
----------------
dmgreen wrote:
> If the pointer operand isn't in the same block, is that a problem? If they are in different blocks, and we know all the loads are in the same block, then we know the pointer operand dominates the RootInsert I think. It wont need the moveBefore below.
Good Point. Will update the patch with this change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137201/new/
https://reviews.llvm.org/D137201
More information about the llvm-commits
mailing list