[llvm] [SelectionDAG] Freeze dynamic vector indices lowered through the stack (PR #225031)
Mahmoud Naderi via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 02:21:22 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);
----------------
slant14 wrote:
yes, `freeze-vector.ll: freeze_dynamic_insertelement_chain_wide_vector`is intended for this
https://github.com/llvm/llvm-project/pull/225031
More information about the llvm-commits
mailing list