diff options
author | Sanjay Patel <spatel@rotateright.com> | 2021-01-13 13:18:08 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2021-01-13 13:30:46 -0500 |
commit | 123674a816742254debdfcc978026b8107b502d8 (patch) | |
tree | e21a28d6c30b1e42d555e8f526afb78e2dc763a1 | |
parent | a2e6506c47b1ab8cb085aa485fd0abf980a47a05 (diff) | |
download | llvm-hostassoc.tar.gz |
[SLP] simplify type check for reductionshostassoc
This is NFC-intended. The 'valid' call allows int/FP/pointers
for other parts of SLP. The difference here is that we can't
reduce pointers.
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 403170447f5a..b3a3d65d3340 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -6809,10 +6809,10 @@ public: if (!RdxTreeInst.isVectorizable(B)) return false; + // Analyze "regular" integer/FP types for reductions - no target-specific + // types or pointers. Type *Ty = B->getType(); - if (!isValidElementType(Ty)) - return false; - if (!Ty->isIntOrIntVectorTy() && !Ty->isFPOrFPVectorTy()) + if (!isValidElementType(Ty) || Ty->isPointerTy()) return false; RdxLeafVal.clear(); |