[llvm] 7452014 - [LV] Simplify !UserVF.isZero() -> UserVF (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 01:40:59 PDT 2024


Author: Florian Hahn
Date: 2024-08-20T09:40:35+01:00
New Revision: 7452014c95f97d2f25ad3e5cfea29085648428da

URL: https://github.com/llvm/llvm-project/commit/7452014c95f97d2f25ad3e5cfea29085648428da
DIFF: https://github.com/llvm/llvm-project/commit/7452014c95f97d2f25ad3e5cfea29085648428da.diff

LOG: [LV] Simplify !UserVF.isZero() -> UserVF (NFC).

Address post-commit comment for b8dccb7d56c to simplify code.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index d097ae116a0d22..86e50a7f914372 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7014,7 +7014,7 @@ LoopVectorizationPlanner::plan(ElementCount UserVF, unsigned UserIC) {
 
   ElementCount MaxUserVF =
       UserVF.isScalable() ? MaxFactors.ScalableVF : MaxFactors.FixedVF;
-  if (!UserVF.isZero()) {
+  if (UserVF) {
     if (!ElementCount::isKnownLE(UserVF, MaxUserVF)) {
       reportVectorizationInfo(
           "UserVF ignored because it may be larger than the maximal safe VF",


        


More information about the llvm-commits mailing list