[PATCH] D96703: [DAG] foldSubToUSubSat - fold sub(a,trunc(umin(zext(a),b))) -> usubsat(a,trunc(umin(b,c)))

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 13:32:49 PST 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3156
   RHS = DAG.getNode(ISD::UMIN, DL, SrcVT, RHS, SatLimit);
   RHS = DAG.getZExtOrTrunc(RHS, DL, DstVT);
   LHS = DAG.getZExtOrTrunc(LHS, DL, DstVT);
----------------
RKSimon wrote:
> craig.topper wrote:
> > Is this always a truncate and never a ZExt?
> Its always a truncate - its me being lazy (and I think an older implementation used to overflow 80col line). I'll change it as a NFC.
Fixed in rG53e83afcaf5ce00073348af847603b2fd6442c81


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96703



More information about the llvm-commits mailing list