[llvm] [RISCV] Update matchSplatAsGather to use the index of extract_elt if in-bounds (PR #118873)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 08:24:44 PST 2024


https://github.com/preames requested changes to this pull request.

I still don't think this is correct.  Consider the case where source vector is 8 x i32, splat is 4 x i32, and Idx = 0.  The index will pass your added check, but we'll fall through the (existing) code below, and try to insert a 8x i32 into a 4 x i32 which is an illegal operation and will fail asserts.  

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


More information about the llvm-commits mailing list