[PATCH] D120422: [AArch64] Optimize comparison chains

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 00:17:34 PST 2022


dmgreen accepted this revision.
dmgreen added a comment.
This revision is now accepted and ready to land.

In D120422#3355281 <https://reviews.llvm.org/D120422#3355281>, @efriedma wrote:

> On a general note, I'm a bit concerned that we now have two different codepaths for generating ccmp during isel: emitConjunction, and performANDORCSELCombine.  As far as I can tell, they're largely overlapping; emitConjunction is more general, and performANDORCSELCombine triggers in more cases, but they're both doing basically the same transform. Can we consolidate this code somehow?

Yep I was thinking of that when I ended up using emitConjunction from branches recently. I think that this method of peephole optimizing bit at a time is a more sensible way to go than trying to do things all at once. It's a more "ISel" way of doing things, and should capture more cases. But a few more folds might be needed before we get to the point that we don't need emitConjunction any more.

As far as this patch goes, it LGTM. Thanks for the updates.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120422/new/

https://reviews.llvm.org/D120422



More information about the llvm-commits mailing list