[PATCH] D91120: [DAGCombine][PowerPC] Convert negated abs to trivial arithmetic ops

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 07:10:58 PST 2020


uweigand added a comment.

In D91120#2399776 <https://reviews.llvm.org/D91120#2399776>, @spatel wrote:

> It seems strange that we would need to add a TLI hook to avoid regressing a target that has abs/nabs support in the ISA.
> If I'm seeing it correctly, SystemZ relies on ISD::ABS being expanded and then pattern-matching the expansion back to `lpgr` for example. Could we change that target to declare ISD::ABS as legal and adjust the tablegen matching for it?

That SystemZ code pre-dates the existence of the common ISD::ABS code by four years or so.  I guess now that common code support ISD::ABS, we can change our back-end to use it instead of our own.  @jonpa , can you have a look?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91120



More information about the llvm-commits mailing list