[PATCH] D156556: [AggressiveInstCombine] Fold strcmp eq, not eq operator improvements

Maksim Kita via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 30 08:17:13 PDT 2023


kitaisreal added a comment.

In D156556#4543191 <https://reviews.llvm.org/D156556#4543191>, @nikic wrote:

> 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.

Thanks. Improved foldOpIntoPhi() in this revision D156620 <https://reviews.llvm.org/D156620>.


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