[llvm] [WIP][SPARC][IAS] Implement Solaris Natural Instruction extension (PR #170794)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 4 17:57:22 PST 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 cpp -- llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp llvm/lib/Target/Sparc/SparcSubtarget.cpp --diff_from_common_commit
``````````

: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/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp b/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
index 862ba3c64..3fac774f1 100644
--- a/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
+++ b/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
@@ -91,7 +91,8 @@ createSparcMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) {
   } else if (!TT.isSPARC64() && !STI->hasFeature(Sparc::Feature32Bit)) {
     STI->setFeatureBits(Features.set(Sparc::Feature32Bit));
   }
-  assert(Features.test(Sparc::Feature32Bit) != Features.test(Sparc::Feature64Bit));
+  assert(Features.test(Sparc::Feature32Bit) !=
+         Features.test(Sparc::Feature64Bit));
 
   return STI;
 }
diff --git a/llvm/lib/Target/Sparc/SparcSubtarget.cpp b/llvm/lib/Target/Sparc/SparcSubtarget.cpp
index 51e59d1a8..9d6473cc9 100644
--- a/llvm/lib/Target/Sparc/SparcSubtarget.cpp
+++ b/llvm/lib/Target/Sparc/SparcSubtarget.cpp
@@ -48,7 +48,8 @@ SparcSubtarget &SparcSubtarget::initializeSubtargetDependencies(
     setFeatureBits(Features.set(Sparc::Feature32Bit));
     Is32Bit = true;
   }
-  assert(Features.test(Sparc::Feature32Bit) != Features.test(Sparc::Feature64Bit));
+  assert(Features.test(Sparc::Feature32Bit) !=
+         Features.test(Sparc::Feature64Bit));
   assert(Is32Bit != Is64Bit);
 
   // Popc is a v9-only instruction.

``````````

</details>


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


More information about the llvm-commits mailing list