[PATCH] D157972: [DAG] SimplifyDemandedBits - add sra(shl(x,c1),c1) -> sign_extend_inreg(x) demanded elts fold
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 07:45:40 PDT 2023
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1948
+ // fold (sra (shl x, c1), c1) -> sext_inreg for some c1 and target
+ // supports sext_inreg.
----------------
pengfei wrote:
> Did we check the constant `c1` some where?
Yes - the `*InnerSA == ShAmt` check on line 1959
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157972/new/
https://reviews.llvm.org/D157972
More information about the llvm-commits
mailing list