[PATCH] D129025: [SimplifyCFG] Skip hoisting common instructions that return token type

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 4 12:50:01 PDT 2022


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1477
+  if (isa<PHINode>(I1) || !I1->isIdenticalToWhenDefined(I2) ||
+      I1->getType()->isTokenTy() || I2->getType()->isTokenTy())
     return false;
----------------
Ugh, I could have sworn I left a comment here, but apparently I didn't: This check shouldn't be here, it should be in the do/while loop below. Otherwise you'll only check that the first instruction doesn't return a token type, but may still hoist it if it's a later instruction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129025/new/

https://reviews.llvm.org/D129025



More information about the llvm-commits mailing list