From: Sanjay Patel Date: Wed, 13 Jan 2021 18:18:08 +0000 (-0500) Subject: [SLP] simplify type check for reductions X-Git-Tag: llvmorg-13-init~1271 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=123674a816742254debdfcc978026b8107b502d8;p=platform%2Fupstream%2Fllvm.git [SLP] simplify type check for reductions 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. --- diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 4031704..b3a3d65 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();