[PATCH] D108978: [NFC] [LoopDeletion] Move ICmpInst handling to getValueOnFirstIteration()
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 2 09:25:09 PDT 2021
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM
Though, I don't believe this is NFC. It would be stronger in the case such as:
%a = icmp ...
%b = icmp ...
%c = or i1 %a, %b
%d = icmp eq i1 %c, 1
br i1 %d....
This is non-canonical IR so this should be a rare pattern in practice, but I don't think this is actually NFC.
================
Comment at: llvm/lib/Transforms/Scalar/LoopDeletion.cpp:329
+ auto *ICmp = dyn_cast<ICmpInst>(Cond);
+ if (!ICmp || !ICmp->getType()->isIntegerTy()) {
MarkAllSuccessorsLive(BB);
----------------
As a follow up, it looks like this test is now redundant for the new code structure. Only part I'm unsure of is the integer test, but I also don't understand why that's there at all.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108978/new/
https://reviews.llvm.org/D108978
More information about the llvm-commits
mailing list