Skip to content

Fix dynamic-index insertelement in LongVectorLoweringPass - #1701

Merged
dneto0 merged 1 commit into
google:mainfrom
rjodinchr:insertelement-longvector
Oct 23, 2026
Merged

dneto0 merged 1 commit into
google:mainfrom
rjodinchr:insertelement-longvector

Conversation

@rjodinchr

Copy link
Copy Markdown
Collaborator

In LongVectorLoweringPass::visitInsertElementInst for dynamic indices, only reuse a LoadInst's pointer operand when it is in the Private address space (avoiding writes into global or constant memory when the vector value was loaded from a buffer), and reload the modified array from PtrOperand after storing the inserted element instead of returning the unmodified pre-store value.

In LongVectorLoweringPass::visitInsertElementInst for dynamic indices, only reuse a LoadInst's pointer operand when it is in the Private address space (avoiding writes into global or constant memory when the vector value was loaded from a buffer), and reload the modified array from PtrOperand after storing the inserted element instead of returning the unmodified pre-store value.
Comment thread lib/LongVectorLoweringPass.cpp
@dneto0
dneto0 merged commit f853014 into google:main Oct 23, 2026
18 checks passed
@rjodinchr
rjodinchr deleted the insertelement-longvector branch October 23, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants