aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/frem-msvc32.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/frem-msvc32.ll')
-rw-r--r--test/CodeGen/X86/frem-msvc32.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/frem-msvc32.ll b/test/CodeGen/X86/frem-msvc32.ll
new file mode 100644
index 000000000000..01144eb44de4
--- /dev/null
+++ b/test/CodeGen/X86/frem-msvc32.ll
@@ -0,0 +1,12 @@
+; Make sure that 32-bit FREM is promoted to 64-bit FREM on 32-bit MSVC.
+
+; MSVC does not have a 32-bit fmodf function, so it must be promoted to
+; a 64-bit fmod rtlib call.
+; RUN: llc -mtriple=i686-pc-windows-msvc -O0 < %s | FileCheck %s
+
+; CHECK: @do_frem32
+; CHECK: {{_fmod$}}
+define float @do_frem32(float %a, float %b) {
+ %val = frem float %a, %b
+ ret float %val
+}