As noticed in https://reviews.llvm.org/D105688, it would be great to move handling of ICmpInst which was in canProveExitOnFirstIteration() to getValueOnFirstIteration()
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
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.
llvm/lib/Transforms/Scalar/LoopDeletion.cpp | ||
---|---|---|
329 | 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. |
llvm/lib/Transforms/Scalar/LoopDeletion.cpp | ||
---|---|---|
329 | You're right, vector type should not pass the matcher. We'll remove it in a follow-up. |
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.