[all-commits] [llvm/llvm-project] 2343ad: [AArch64] Add index check before lowerInterleavedS...
Peter Rong via All-commits
all-commits at lists.llvm.org
Mon Oct 10 04:52:47 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2343ad755d602fe67e3418d4edf0a5d0780045d6
https://github.com/llvm/llvm-project/commit/2343ad755d602fe67e3418d4edf0a5d0780045d6
Author: Peter Rong <PeterRong96 at gmail.com>
Date: 2022-10-10 (Mon, 10 Oct 2022)
Changed paths:
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
A llvm/test/CodeGen/AArch64/aarch64-interleaved-access-w-undef.ll
Log Message:
-----------
[AArch64] Add index check before lowerInterleavedStore() uses ShuffleVectorInst's mask
This commit fixes https://github.com/llvm/llvm-project/issues/57326.
Currently we would take a Mask out and directly use it by doing
auto Mask = SVI->getShuffleMask();
However, if the mask is undef, this Mask is not initialized. It might be
a vector of -1 or random integers.
This would cause an Out-of-bound read later when trying to find a
StartMask.
This change checks if all indices in the Mask is in the allowed range,
and fixes the out-of-bound accesses.
Differential Revision: https://reviews.llvm.org/D132634
More information about the All-commits
mailing list