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 }