[llvm] [ScalarEvolutionExpander] Don't drop nowrap flags on addrec expansion (PR #78199)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 15 10:28:22 PST 2024
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 2e08e821b7ea5bf7c0fe0775feb94a7fdb5204c7 1286729a394bac679f9aa57544ce3f920422a30b -- llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
index e87b430d6b..17a43c80c3 100644
--- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
@@ -1250,12 +1250,11 @@ Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
// If this is a simple linear addrec, emit it now as a special case.
if (S->isAffine()) // {0,+,F} --> i*F
- return
- expand(SE.getTruncateOrNoop(
- SE.getMulExpr(SE.getUnknown(CanonicalIV),
- SE.getNoopOrAnyExtend(S->getOperand(1),
- CanonicalIV->getType()),
- S->getNoWrapFlags(SCEV::FlagNW)),
+ return expand(SE.getTruncateOrNoop(
+ SE.getMulExpr(
+ SE.getUnknown(CanonicalIV),
+ SE.getNoopOrAnyExtend(S->getOperand(1), CanonicalIV->getType()),
+ S->getNoWrapFlags(SCEV::FlagNW)),
Ty));
// If this is a chain of recurrences, turn it into a closed form, using the
``````````
</details>
https://github.com/llvm/llvm-project/pull/78199
More information about the llvm-commits
mailing list