aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorSterling-Augustine <56981066+Sterling-Augustine@users.noreply.github.com>2024-11-20 11:53:41 -0800
committerGitHub <noreply@github.com>2024-11-20 11:53:41 -0800
commitc0ee8e22f4093ea1fda42cc037d50cb4619e1445 (patch)
tree999534828c029b6ce57bdfe15ed3002be8b1257d /llvm/lib
parent77ee94e78a52cf65e66c67804bf5b9bb5fe29b07 (diff)
downloadllvm-c0ee8e22f4093ea1fda42cc037d50cb4619e1445.zip
llvm-c0ee8e22f4093ea1fda42cc037d50cb4619e1445.tar.gz
llvm-c0ee8e22f4093ea1fda42cc037d50cb4619e1445.tar.bz2
[SandboxVec][SeedCollector] Reject non-simple memory ops for memory seeds (#116891)
Load/Store isSimple is a necessary condition for VectorSeeds, but not sufficient, so reverse the condition and return value, and continue the check. Add relevant tests.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp
index 17544af..6ea34c5 100644
--- a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp
+++ b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp
@@ -140,8 +140,8 @@ LLVM_DUMP_METHOD void SeedContainer::dump() const { print(dbgs()); }
#endif // NDEBUG
template <typename LoadOrStoreT> static bool isValidMemSeed(LoadOrStoreT *LSI) {
- if (LSI->isSimple())
- return true;
+ if (!LSI->isSimple())
+ return false;
auto *Ty = Utils::getExpectedType(LSI);
// Omit types that are architecturally unvectorizable
if (Ty->isX86_FP80Ty() || Ty->isPPC_FP128Ty())