[llvm] [PowerPC] Add custom lowering for SADD overflow for i32 and i64 (PR #159255)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 23:59:47 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 origin/main HEAD --extensions h,cpp -- llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/PowerPC/PPCISelLowering.h
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 0798dae3a..4e4e9a9ab 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -205,7 +205,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
   if (!Subtarget.hasP10Vector()) {
     setOperationAction(ISD::SSUBO, MVT::i32, Custom);
     setOperationAction(ISD::SADDO, MVT::i32, Custom);
-    if (isPPC64){
+    if (isPPC64) {
       setOperationAction(ISD::SSUBO, MVT::i64, Custom);
       setOperationAction(ISD::SADDO, MVT::i64, Custom);
     }

``````````

</details>


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


More information about the llvm-commits mailing list