[llvm] MSP430: Remove more default compiler-rt calls (PR #164752)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 22 22:06:47 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-msp430

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>

These are overridden so remove the defaults. Also
add apparently missing tests.

---
Full diff: https://github.com/llvm/llvm-project/pull/164752.diff


2 Files Affected:

- (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+3-1) 
- (modified) llvm/test/CodeGen/MSP430/libcalls.ll (+14) 


``````````diff
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index a8b647c22317e..3dc9055eb4895 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -2117,7 +2117,9 @@ defvar MSP430DefaultOptOut = [
   __fixdfdi, __fixunsdfsi, __modsi3, __floatunsisf,
   __fixunsdfdi, __ltsf2, __floatdisf, __floatdidf,
   __lshrsi3, __subsf3, __umodhi3, __floatunsidf,
-  __floatundidf
+  __floatundidf, __gtdf2, __eqdf2, __gedf2, __ltdf2, __ledf2,
+  __adddf3, __divdf3, __divdi3, __moddi3,
+  __muldf3, __subdf3, __udivdi3, __umoddi3
 ];
 
 // EABI Libcalls - EABI Section 6.2
diff --git a/llvm/test/CodeGen/MSP430/libcalls.ll b/llvm/test/CodeGen/MSP430/libcalls.ll
index 5d3755cbf9b0c..d1bafea2be5db 100644
--- a/llvm/test/CodeGen/MSP430/libcalls.ll
+++ b/llvm/test/CodeGen/MSP430/libcalls.ll
@@ -639,4 +639,18 @@ entry:
   ret i32 %shr
 }
 
+define i64 @test__mspabi_divull(i64 %a, i64 %b) #0 {
+; CHECK-LABEL: test__mspabi_divull:
+; CHECK: call #__mspabi_divull
+  %result = udiv i64 %a, %b
+  ret i64 %result
+}
+
+define i64 @test__mspabi_remull(i64 %a, i64 %b) #0 {
+; CHECK-LABEL: test__mspabi_remull:
+; CHECK: call #__mspabi_remull
+  %result = urem i64 %a, %b
+  ret i64 %result
+}
+
 attributes #0 = { nounwind }

``````````

</details>


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


More information about the llvm-commits mailing list