[DAG] SimplifyDemandedBits - call ComputeKnownBits for constant non-uniform ISD:...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 21 Jul 2023 13:44:03 +0000 (14:44 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 21 Jul 2023 13:52:57 +0000 (14:52 +0100)
commitae60706da07a128e318ebc383d682e3861337c68
tree86ca33ffb91c84e8a5083c48b1d3906ba15dc323
parent440808faf63725a024eb42780c6aca2c60b7e597
[DAG] SimplifyDemandedBits - call ComputeKnownBits for constant non-uniform ISD::SRL shift amounts

We only attempted to determine KnownBits for uniform constant shift amounts, but ComputeKnownBits is able to handle some non-uniform cases as well that we can use as a fallback.
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/LoongArch/rotl-rotr.ll
llvm/test/CodeGen/RISCV/rotl-rotr.ll
llvm/test/CodeGen/RISCV/rvv/bitreverse-sdnode.ll
llvm/test/CodeGen/X86/combine-srl.ll