[PATCH] D96703: [DAG] foldSubToUSubSat - fold sub(a,trunc(umin(zext(a),b))) -> usubsat(a,trunc(umin(b,c)))
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 23:28:23 PST 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3192
+ // sub(a,trunc(umin(zext(a),b))) -> usubsat(a,trunc(umin(b,c)))
+ if (Op1.getOpcode() == ISD::TRUNCATE &&
----------------
RKSimon wrote:
> craig.topper wrote:
> > craig.topper wrote:
> > > What is 'c' here? It doesn't appear in the sub(a,trunc(umin(zext(a),b))) pattern
> > Or is 'c' a constant which I think we usually write as capital C?
> Yes - its a constant - do you think "C" or "SatLimit" would be better?
Let's go with SatLimit.
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