diff options
author | Kazu Hirata <kazu@google.com> | 2021-01-12 21:43:50 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-01-12 21:43:50 -0800 |
commit | 8a20e2b3d3e149f9e40dc34673fce7953d985c24 (patch) | |
tree | 28a179996425ae6237e922771b424f982b1ccbc9 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 2c2d489b78c43072b65f3d8c88c91def4c69f320 (diff) | |
download | llvm-8a20e2b3d3e149f9e40dc34673fce7953d985c24.zip llvm-8a20e2b3d3e149f9e40dc34673fce7953d985c24.tar.gz llvm-8a20e2b3d3e149f9e40dc34673fce7953d985c24.tar.bz2 |
[llvm] Use Optional::getValueOr (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index ba96e84..401fe45 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -310,8 +310,7 @@ llvm::getOptionalElementCountLoopAttribute(Loop *TheLoop) { if (Width.hasValue()) { Optional<int> IsScalable = getOptionalIntLoopAttribute( TheLoop, "llvm.loop.vectorize.scalable.enable"); - return ElementCount::get(*Width, - IsScalable.hasValue() ? *IsScalable : false); + return ElementCount::get(*Width, IsScalable.getValueOr(false)); } return None; |