[PATCH] D85043: [InstSimplify] simplify abs if operand is known non-negative

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 1 00:49:08 PDT 2020


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

LG

In D85043#2188428 <https://reviews.llvm.org/D85043#2188428>, @spatel wrote:

> Patch updated:
> Pass in more info from the SimplifyQuery to ValueTracking. 
> Not sure what it takes to show the benefit, so no test diffs, but if there are suggestions, let me know.

Something like `assume(x >= 0); abs(x)` should do it.


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

https://reviews.llvm.org/D85043



More information about the llvm-commits mailing list