[llvm] [SelectionDAG] Freeze dynamic vector indices lowered through the stack (PR #225031)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 02:10:37 PDT 2026


================
@@ -25436,6 +25358,9 @@ SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) {
           if (!IsByteSized && Elmnt.getValueType().bitsLT(EltVT))
             Elmnt = DAG.getNode(ISD::ANY_EXTEND, DL, EltVT, Elmnt);
 
+          // Freeze the index, as clamping a poison index would be meaningless.
+          Index = DAG.getFreeze(Index);
----------------
RKSimon wrote:

Please can you confirm that all these getFreeze calls have test coverage?

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


More information about the llvm-commits mailing list