[PATCH] D156556: [AggressiveInstCombine] Fold strcmp eq, not eq operator improvements
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 10:55:34 PDT 2023
nikic added a comment.
The general alternative here is to not make AggressiveInstCombine produce better code, but rather teach something else to optimize the pattern it does produce, with the benefit that it can also help other code.
This seems like foldOpIntoPhi() for icmps should //nearly// handle -- I expect the problem is that we lose the fact that the icmp of the phi is false for one incoming value, because that fact is only known on the edge, while we perform simplification at the terminator of the predecessor. Adding a special case for that based on isImpliedCond should probably be sufficient to simplify this pattern.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156556/new/
https://reviews.llvm.org/D156556
More information about the llvm-commits
mailing list