[PATCH] D146121: [DAG] Move lshr narrowing from visitANDLike to SimplifyDemandedBits

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 11:53:01 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1871
+           TLO.DAG.MaskedValueIsZero(
+               Op0, APInt::getHighBitsSet(BitWidth, BitWidth / 2)))) {
+        EVT HalfVT = EVT::getIntegerVT(*TLO.DAG.getContext(), BitWidth / 2);
----------------
Doesn't the `InDemandedMask.countLeadingZeros() >= (BitWidth / 2)` check the same thing as `TLO.DAG.MaskedValueIsZero(Op0, APInt::getHighBitsSet(BitWidth, BitWidth / 2))` What is the rationale for having both?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146121



More information about the llvm-commits mailing list