[llvm] [DAGCombiner][VP] add getNegative for VPMatchContext (PR #80635)

Jianjian Guan via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 23:09:36 PST 2024


================
@@ -9708,6 +9710,16 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
   return getNode(Opcode, DL, VT, Ops, Flags);
 }
 
+SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
----------------
jacquesguan wrote:

The logic seems different between this function and `getNegative`. `getNegative` will use the VP version `SUB` automatically if we have a non-null `VPOp`. But these 2 new `getNode` ask the user to chose right opcode even giving a non-null `VPOp`. It's a little bit inconsistent.

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


More information about the llvm-commits mailing list