[PATCH] D137931: [RISCV] Don't use zero-stride vector load for gather if not optimized

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 12:28:41 PST 2022


reames requested changes to this revision.
reames added a comment.
This revision now requires changes to proceed.

This isn't correct.  The strided load can be masked.   For the case where all lanes are masked off, executing the scalar load is unsound and could introduce a fault.

You could allow any mask where you can prove at least one lane active, or make the scalar store conditional, but there's a bunch of complexity there.  As a starting point, I suggest you restrict your transformation to when the instruction is unmasked.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137931/new/

https://reviews.llvm.org/D137931



More information about the llvm-commits mailing list