================
@@ -953,8 +953,17 @@ class SelectionDAG {
   }
 
   /// Insert \p SubVec at the \p Idx element of \p Vec.
+  /// If \p SkipUndef is true and \p SubVec is UNDEF/POISON, then \p Vec is
+  /// returned.
----------------
bjope wrote:

I think having an explicit flag to say "I want an INSERT_SUBVECTOR, but you may 
skip if ...." is better than the implicit things going on in getNode (when you 
want to create a node with a specific opcode and get something else back 
without having explicit control).

In this wrapper it is more of a way to avoid some code duplication, by having 
to implement the logic for checking SubVec.isUndef() and making conditional 
calls to getInsertSubvector. It seemed like a good place to put that logic here.

https://github.com/llvm/llvm-project/pull/143105
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to