[llvm] [LoopUnswitch] Allow i1 truncs in loop unswitch (PR #89738)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 06:29:14 PDT 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 a9689c6029e3078e09e43a4efb2b2ced98e9020f 3763f4f2af1072bab25ff1d9c906e28271b3c8b1 -- llvm/lib/Transforms/Utils/LoopUtils.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 6799e3973f..59bee4ce0d 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -1931,7 +1931,7 @@ llvm::hasPartialIVCondition(const Loop &L, unsigned MSSAThreshold,
return {};
Instruction *CondI = dyn_cast<CmpInst>(TI->getCondition());
- if (!CondI){
+ if (!CondI) {
CondI = dyn_cast<TruncInst>(TI->getCondition());
if (CondI && CondI->getType() != Type::getInt1Ty(TI->getContext()))
return {};
``````````
</details>
https://github.com/llvm/llvm-project/pull/89738
More information about the llvm-commits
mailing list