[llvm] [RISCV] Narrow vector absolute value (PR #82041)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 15:00:19 PST 2024


================
@@ -15611,6 +15611,19 @@ SDValue RISCVTargetLowering::PerformDAGCombine(SDNode *N,
     return DAG.getNode(ISD::AND, DL, VT, NewFMV,
                        DAG.getConstant(~SignBit, DL, VT));
   }
+  case ISD::ABS: {
+    EVT VT = N->getValueType(0);
+    SDValue N0 = N->getOperand(0);
+    // abs (sext) -> sext (abs)
----------------
preames wrote:

You're 100% right here.  Change pushed.

https://github.com/llvm/llvm-project/pull/82041


More information about the llvm-commits mailing list