[PATCH] D98728: [LICM] Fix a crash when sinking instructions w/token operands
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 16 14:52:19 PDT 2021
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
LGTM given that we already do not create LCSSA phis during regular LCSSA construction.
================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:1515
if (Loop *OLoop = LI->getLoopFor(OInst->getParent()))
- if (!OLoop->contains(&PN)) {
+ if (!OLoop->contains(&PN) && !Op->getType()->isTokenTy()) {
PHINode *OpPN =
----------------
It might be helpful for future readers of the code if the token-type check would be separate & with a brief comment (perhaps an early continue). I'm fine either way, please feel free to disregard the comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98728/new/
https://reviews.llvm.org/D98728
More information about the llvm-commits
mailing list