[PATCH] D39906: [InstCombine] reassociate loop invariant GEP chains to enable LICM
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 9 14:10:17 PST 2018
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1683
+ Src->setOperand(1, GO1);
+ GEP.setOperand(1, SO1);
+ return &GEP;
----------------
I think you need to check `Src->hasOneUse()`?
https://reviews.llvm.org/D39906
More information about the llvm-commits
mailing list