summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/x86_64-mul-by-const.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/x86_64-mul-by-const.ll')
-rw-r--r--test/CodeGen/X86/x86_64-mul-by-const.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/X86/x86_64-mul-by-const.ll b/test/CodeGen/X86/x86_64-mul-by-const.ll
new file mode 100644
index 0000000000..9cda9ab192
--- /dev/null
+++ b/test/CodeGen/X86/x86_64-mul-by-const.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
+; Formerly there were two shifts. 8771012.
+
+define i32 @f9188_mul365384439_shift27(i32 %A) nounwind {
+; CHECK: imulq $365384439,
+; CHECK: shrq $59, %rax
+ %tmp1 = udiv i32 %A, 1577682821 ; <i32> [#uses=1]
+ ret i32 %tmp1
+}