[compiler-rt] [RISCV][compiler-rt] Asm funcs should be hidden (PR #226633)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 20:50:24 PDT 2026


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 inc -- compiler-rt/lib/builtins/riscv/int_mul_impl.inc --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/compiler-rt/lib/builtins/riscv/int_mul_impl.inc b/compiler-rt/lib/builtins/riscv/int_mul_impl.inc
index 43f046ec4..a96ce946f 100644
--- a/compiler-rt/lib/builtins/riscv/int_mul_impl.inc
+++ b/compiler-rt/lib/builtins/riscv/int_mul_impl.inc
@@ -14,21 +14,20 @@
 #error "__mulxi3 must be defined to use this generic implementation"
 #endif
 
-	.text
-	.align 2
+.text
+    .align 2
 
-	.globl __mulxi3
-	.hidden __mulxi3
-	.type  __mulxi3, @function
-__mulxi3:
-	mv     a2, a0
-	mv     a0, zero
-.L1:
-	andi   a3, a1, 1
-	beqz   a3, .L2
-	add    a0, a0, a2
-.L2:
-	srli   a1, a1, 1
-	slli   a2, a2, 1
-	bnez   a1, .L1
-	ret
+    .globl __mulxi3.hidden __mulxi3.type __mulxi3,
+    @function __mulxi3 : mv a2,
+                         a0 mv a0,
+                         zero.L1 : andi a3,
+                         a1,
+                         1 beqz a3,
+                         .L2 add a0,
+                         a0,
+                         a2.L2 : srli a1,
+                         a1,
+                         1 slli a2,
+                         a2,
+                         1 bnez a1,
+                         .L1 ret

``````````

</details>


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


More information about the llvm-commits mailing list