[PATCH] D96413: [DAG] Move basic USUBSAT pattern matches from X86 to DAGCombine

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 13:22:30 PST 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3149
+    // clamping RHS.
+    KnownBits KnownLHS = DAG.computeKnownBits(LHS);
+    unsigned NumZeros = KnownLHS.countMinLeadingZeros();
----------------
craig.topper wrote:
> Is this equivalent to something like  
> 
> if (!DAG.MaskedValueIsZero(LHS, APInt::getBitsSetFrom(SubVT.getScalarSizeInBits(), DstVT.getScalarSizeInBits())
Yes - missed that one when I moved this from x86......


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96413



More information about the llvm-commits mailing list