diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-10-13 23:00:11 +0000 |
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-10-13 23:00:11 +0000 |
| commit | 7705c4f1be36d8c3384f71b71fdd6751a49d7a70 (patch) | |
| tree | 9160a6b9510c0ec4964117fe16d1c1daa53e6618 /llvm/test/CodeGen/X86 | |
| parent | 18fad46fe3c6b13698821b302f0c4b1b1f44007d (diff) | |
| download | bcm5719-llvm-7705c4f1be36d8c3384f71b71fdd6751a49d7a70.tar.gz bcm5719-llvm-7705c4f1be36d8c3384f71b71fdd6751a49d7a70.zip | |
CodeGen: use MSVC division on windows itanium
Windows itanium is identical to MSVC when dealing with everything but C++.
Lower the math routines into msvcrt rather than compiler-rt.
llvm-svn: 284175
Diffstat (limited to 'llvm/test/CodeGen/X86')
| -rw-r--r-- | llvm/test/CodeGen/X86/divide-windows-itanium.ll | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/divide-windows-itanium.ll b/llvm/test/CodeGen/X86/divide-windows-itanium.ll new file mode 100644 index 00000000000..4a8a9138073 --- /dev/null +++ b/llvm/test/CodeGen/X86/divide-windows-itanium.ll @@ -0,0 +1,38 @@ +; RUN: llc -mtriple i686-windows-itanium -filetype asm -o - %s | FileCheck %s + +define i64 @f(i64 %i, i64 %j) { + %1 = sdiv i64 %i, %j + ret i64 %1 +} + +; CHECK-LABEL: _f: +; CHECK-NOT: calll ___divdi3 +; CHECK: calll __alldiv + +define i64 @g(i64 %i, i64 %j) { + %1 = udiv i64 %i, %j + ret i64 %1 +} + +; CHECK-LABEL: _g: +; CHECK-NOT: calll ___udivdi3 +; CHECK: calll __aulldiv + +define i64 @h(i64 %i, i64 %j) { + %1 = srem i64 %i, %j + ret i64 %1 +} + +; CHECK-LABEL: _h: +; CHECK-NOT: calll ___moddi3 +; CHECK: calll __allrem + +define i64 @i(i64 %i, i64 %j) { + %1 = urem i64 %i, %j + ret i64 %1 +} + +; CHECK-LABEL: _i: +; CHECK-NOT: calll ___umoddi3 +; CHECK: calll __aullrem + |

