summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/divide-by-constant.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/divide-by-constant.ll')
-rw-r--r--llvm/test/CodeGen/X86/divide-by-constant.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/divide-by-constant.ll b/llvm/test/CodeGen/X86/divide-by-constant.ll
index 545662fd0ff..7ceb972f61b 100644
--- a/llvm/test/CodeGen/X86/divide-by-constant.ll
+++ b/llvm/test/CodeGen/X86/divide-by-constant.ll
@@ -51,3 +51,12 @@ define i32 @test5(i32 %A) nounwind {
; CHECK: mull 4(%esp)
}
+define signext i16 @test6(i16 signext %x) nounwind {
+entry:
+ %div = sdiv i16 %x, 10
+ ret i16 %div
+; CHECK: test6:
+; CHECK: imull $26215, %eax, %eax
+; CHECK: shrl $31, %ecx
+; CHECK: sarl $18, %eax
+}
OpenPOWER on IntegriCloud