[llvm] [LoongArch] Optimize insertelement containing variable index using compare+select (PR #151131)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 29 06:32:37 PDT 2025
zhaoqi5 wrote:
According to https://llvm.org/docs/LangRef.html#insertelement-instruction:
`If idx exceeds the length of val for a fixed-length vector, the result is a poison value.`
Before this commit, seems that element in `idx%eltnum` changed if `idx` exceeds.
But the result vector will stay unchanged after this commit. (In fact, this behaves the same as when idx is a constant.)
Anyway, both are right?
https://github.com/llvm/llvm-project/pull/151131
More information about the llvm-commits
mailing list