[llvm] [indvars] Support known positive extends in getExtendedOperandRecurrence (PR #70990)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 1 14:51:30 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff dba04bbcf47007bb57f4686f10b55455cbbad84e 108b56c66e748721200626cd412b700cac484ff5 -- llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
index a3763c406884..1ac8b1feb42e 100644
--- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
@@ -1392,11 +1392,11 @@ WidenIV::getExtendedOperandRecurrence(WidenIV::NarrowIVDefUse DU) {
if (OBO->hasNoSignedWrap()) {
ExtKind = ExtendKind::Sign;
ExtendOperExpr = SE->getSignExtendExpr(
- SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType);
+ SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType);
} else if (OBO->hasNoUnsignedWrap()) {
ExtKind = ExtendKind::Zero;
ExtendOperExpr = SE->getZeroExtendExpr(
- SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType);
+ SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType);
} else
return {nullptr, ExtendKind::Unknown};
} else
``````````
</details>
https://github.com/llvm/llvm-project/pull/70990
More information about the llvm-commits
mailing list