aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-20 10:38:12 -0700
committerKazu Hirata <kazu@google.com>2022-06-20 10:38:12 -0700
commite0e687a615c1fdb6ba034fc2e48b0834a372706f (patch)
tree79455a1fe4a3d455cbd304ca0c7c77dde47e1f61 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parente363c5963dc3ad5d9492d3f37055ad56a84411a5 (diff)
downloadllvm-e0e687a615c1fdb6ba034fc2e48b0834a372706f.zip
llvm-e0e687a615c1fdb6ba034fc2e48b0834a372706f.tar.gz
llvm-e0e687a615c1fdb6ba034fc2e48b0834a372706f.tar.bz2
[llvm] Don't use Optional::hasValue (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 5d16a1e..b7656f4 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -254,7 +254,7 @@ llvm::getOptionalElementCountLoopAttribute(const Loop *TheLoop) {
Optional<int> Width =
getOptionalIntLoopAttribute(TheLoop, "llvm.loop.vectorize.width");
- if (Width.hasValue()) {
+ if (Width) {
Optional<int> IsScalable = getOptionalIntLoopAttribute(
TheLoop, "llvm.loop.vectorize.scalable.enable");
return ElementCount::get(*Width, IsScalable.value_or(false));