[PATCH] D129793: [LSR] Allow already invariant operand for ICmpZero matching [try 2]
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 13:20:18 PDT 2022
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LG
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:3346
+ (!isa<Instruction>(NV) ||
+ DT.dominates(cast<Instruction>(NV), L->getHeader())) &&
+ !NV->getType()->isPointerTy()) {
----------------
I was going to say the check for instructions is unnecessary, but this is the one dominates() API where it is needed: https://github.com/llvm/llvm-project/blob/09531ede6d5622da68941902072dbca517d31318/llvm/include/llvm/IR/Dominators.h#L199-L201
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129793/new/
https://reviews.llvm.org/D129793
More information about the llvm-commits
mailing list