[PATCH] D149383: [SelectionDAG][WIP] Add support for evaluating SetCC based on knownbits

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 14:24:39 PDT 2023


goldstein.w.n added a comment.

In D149383#4305324 <https://reviews.llvm.org/D149383#4305324>, @RKSimon wrote:

> This is very similar to a patch I tried a while ago: D86578 <https://reviews.llvm.org/D86578> - one of the blockers for which was all the over-reduced test cases that it broke

What do you mean over-reduces?
But nikic has a point that realistic backend code shouldn't be affected by this much.
I think there are some cases that benefit like `cttz`/`ctlz` cases if zero is no poison AND target doesn't have `tzcnt`/`lzcnt`
but thats niche.

It may also be able to help with intermediate `select` statement introduced during lowering that are
actually constant foldable.

Maybe a different way to test `isKnownNeverZero` is better?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149383



More information about the llvm-commits mailing list