aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/divide-by-constant.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/divide-by-constant.ll')
-rw-r--r--test/CodeGen/X86/divide-by-constant.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/X86/divide-by-constant.ll b/test/CodeGen/X86/divide-by-constant.ll
index 545662f..7ceb972 100644
--- a/test/CodeGen/X86/divide-by-constant.ll
+++ b/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
+}