[SelectionDAG] Make getNode which uses single element SDVTList pass SDNodeFlags.
authorYeting Kuo <yeting.kuo@sifive.com>
Mon, 16 May 2022 03:56:31 +0000 (11:56 +0800)
committerYeting Kuo <yeting.kuo@sifive.com>
Mon, 16 May 2022 10:19:46 +0000 (18:19 +0800)
The patch make users not need to know getNode with SDNodeFlags argument may not
pass its flags.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D125659

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index fc3a19f..d654688 100644 (file)
@@ -8913,7 +8913,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList,
 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList,
                               ArrayRef<SDValue> Ops, const SDNodeFlags Flags) {
   if (VTList.NumVTs == 1)
-    return getNode(Opcode, DL, VTList.VTs[0], Ops);
+    return getNode(Opcode, DL, VTList.VTs[0], Ops, Flags);
 
 #ifndef NDEBUG
   for (auto &Op : Ops)