[llvm-branch-commits] [llvm] [SelectionDAG] Deal with POISON for INSERT_VECTOR_ELT/INSERT_SUBVECTOR (part 3) (PR #143105)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jul 7 00:11:15 PDT 2025


================
@@ -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.
----------------
arsenm wrote:

This is a strange pattern that I feel like should be avoided. I don't understand why this would need semantic treatment. These get* functions should just return with the node with the requested operands 

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


More information about the llvm-branch-commits mailing list