[PATCH] D91876: [DAG] Move vselect(icmp_ult, -1, add(x,y)) -> uaddsat(x,y) to DAGCombine (PR40111)

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 14:57:37 PST 2020


dmgreen accepted this revision.
dmgreen added a comment.
This revision is now accepted and ready to land.

Interestingly, this seems to be detecting a different set of patterns than those that would be converted by instcombine, with `unsigned_sat_constant_v16i8_using_cmp_sum` and `unsigned_sat_constant_v16i8_using_cmp_notval` getting converted here but not in instcombine and `unsigned_sat_constant_v16i8_using_min` being the other way around.  The ones I looked into checked out as being valid to transform (and the code was already being used is always a good sign). It might be worth looking if any of these tricks are missing from instcombine. This patch looks like an improvement on it's own though.

LGTM, Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91876



More information about the llvm-commits mailing list