summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2019-01-25 20:51:55 +0000
committerAlina Sbirlea <asbirlea@google.com>2019-01-25 20:51:55 +0000
commit890a8e575f5b0d73711338357f204d95055a1023 (patch)
tree4a1c238d27edaa055acb95edaf945357d9c76988 /llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp
parent05a60643853865c0323acc30c80e2cf948186520 (diff)
downloadbcm5719-llvm-890a8e575f5b0d73711338357f204d95055a1023.tar.gz
bcm5719-llvm-890a8e575f5b0d73711338357f204d95055a1023.zip
[WarnMissedTransforms] Set default to 1.
Summary: Set default value for retrieved attributes to 1, since the check is against 1. Eliminates the warning noise generated when the attributes are not present. Reviewers: sanjoy Subscribers: jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D57253 llvm-svn: 352238
Diffstat (limited to 'llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp b/llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp
index 73687e1e5df..b6b31cf68e5 100644
--- a/llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp
+++ b/llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp
@@ -51,7 +51,7 @@ static void warnAboutLeftoverTransformations(Loop *L,
Optional<int> InterleaveCount =
getOptionalIntLoopAttribute(L, "llvm.loop.interleave.count");
- if (VectorizeWidth.getValueOr(0) != 1)
+ if (VectorizeWidth.getValueOr(1) != 1)
ORE->emit(
DiagnosticInfoOptimizationFailure(DEBUG_TYPE,
"FailedRequestedVectorization",
@@ -59,7 +59,7 @@ static void warnAboutLeftoverTransformations(Loop *L,
<< "loop not vectorized: the optimizer was unable to perform the "
"requested transformation; the transformation might be disabled "
"or specified as part of an unsupported transformation ordering");
- else if (InterleaveCount.getValueOr(0) != 1)
+ else if (InterleaveCount.getValueOr(1) != 1)
ORE->emit(
DiagnosticInfoOptimizationFailure(DEBUG_TYPE,
"FailedRequestedInterleaving",
OpenPOWER on IntegriCloud