[PATCH] D132634: [AArch64] Add index check before lowerInterleavedStore() uses ShuffleVectorInst's mask

Peter Rong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 15:27:37 PDT 2022


Peter updated this revision to Diff 455739.
Peter added a comment.

Use new checks to sanitize Mask. Adding new tests and fixed test failures.

Previous check abort if anyone index is invalid, which is too strict. 
A Mask can have undef/poison values in some of the indeces and we shouldn't abort in that case.
Thus we have failed testcases.

All we need to look out for is when the whole mask is undef, thus -1.
Therefore, we changed the checks from "abort if ANY index is invalid" to "abort if ALL index is invalid"

After discussion with Fhahn, we find that `poison` can also crash the code like `undef`, thus a `poison` testcase is added.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132634

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/aarch64-shufflevector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132634.455739.patch
Type: text/x-patch
Size: 120743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220825/4f99d7c7/attachment-0001.bin>


More information about the llvm-commits mailing list