[PATCH] D29639: [SelectionDAG] Add a signed integer absolute ISD node

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 06:34:35 PDT 2017


RKSimon added a comment.

In https://reviews.llvm.org/D29639#699976, @efriedma wrote:

> Would it make sense to use ISD::ABS over combineIntegerAbs in X86ISelLowering.cpp?


Yes, although probably as a followup once the legalization support is in place.



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5514
+    return N0;
+  return SDValue();
+}
----------------
efriedma wrote:
> There are a lot of other folds we could do here (e.g. abs(-x) -> abs(x)), but maybe not worth worrying about?
Definitely scope for further combines, but I'd rather see them in the wild before adding them.


Repository:
  rL LLVM

https://reviews.llvm.org/D29639





More information about the llvm-commits mailing list