[PATCH] D148963: [X86] Support `X86ISD::PCMPEQ` and `X86ISD::PCMPGT` in ComputeKnownBits

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 01:25:32 PDT 2023


nikic added a comment.

In D148963#4304568 <https://reviews.llvm.org/D148963#4304568>, @RKSimon wrote:

> In D148963#4304551 <https://reviews.llvm.org/D148963#4304551>, @nikic wrote:
>
>> Shouldn't this be a DAGCombine instead? It seems pointless to make computeKnownBits() recurse past an instruction that can only return either unknown or constant. If it returns constant, we want to just replace the instruction, and otherwise we get zero information.
>
> At least part of this is only matching cases because it has access to the DemandedElts mask

Hm, through which pathway does this actually end up folding in the non-trivial DemandedElts case? I'd have guessed SimplifyDemandedBits, but it doesn't seem to have a generic constant known bits to constant combine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148963



More information about the llvm-commits mailing list