[PATCH] D91120: [DAGCombine][PowerPC] Fold negated abs to avoid generating `select_cc`

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 03:53:01 PST 2020


steven.zhang added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9335
+    if (N0.getOpcode() == ISD::SETCC) {
+      SDValue LHS = N0.getOperand(0);
+      SDValue RHS = N0.getOperand(1);
----------------
Should we fold it into sub (0, ABS()) if ABS is legal ? And how about the VSELECT ? And it also surprise me that, there isn't pattern here for the ABS(). If it has, your code might merge with that one.


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