[llvm] [AVR] Fix codegen after getConstant assertions got enabled (PR #152269)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 01:13:26 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Target/AVR/AVRISelLowering.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AVR/AVRISelLowering.cpp b/llvm/lib/Target/AVR/AVRISelLowering.cpp
index 6afdbe639..9252d17cd 100644
--- a/llvm/lib/Target/AVR/AVRISelLowering.cpp
+++ b/llvm/lib/Target/AVR/AVRISelLowering.cpp
@@ -713,7 +713,8 @@ SDValue AVRTargetLowering::getAVRCmp(SDValue LHS, SDValue RHS, ISD::CondCode CC,
     // Turn lhs < rhs with lhs constant into rhs >= lhs+1, this allows us to
     // fold the constant into the cmp instruction.
     if (const ConstantSDNode *C = dyn_cast<ConstantSDNode>(RHS)) {
-      // Doing a "icmp ugt i16 65535, %0" comparison should have been handled already.
+      // Doing a "icmp ugt i16 65535, %0" comparison should have been handled
+      // already.
       assert((!C->isAllOnes()) && "integer overflow in comparison transform");
       RHS = DAG.getConstant(C->getZExtValue() + 1, DL, VT);
       CC = ISD::SETUGE;

``````````

</details>


https://github.com/llvm/llvm-project/pull/152269


More information about the llvm-commits mailing list