diff options
author | Kazu Hirata <kazu@google.com> | 2022-06-20 10:38:12 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-06-20 10:38:12 -0700 |
commit | e0e687a615c1fdb6ba034fc2e48b0834a372706f (patch) | |
tree | 79455a1fe4a3d455cbd304ca0c7c77dde47e1f61 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | e363c5963dc3ad5d9492d3f37055ad56a84411a5 (diff) | |
download | llvm-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.cpp | 2 |
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)); |