1; RUN: llc -mtriple=x86_64-none-linux -fast-isel -fast-isel-abort=1 -verify-machineinstrs < %s | FileCheck %s
2
3define i64 @test_sdiv64(i64 %dividend, i64 %divisor) nounwind {
4entry:
5  %result = sdiv i64 %dividend, %divisor
6  ret i64 %result
7}
8
9; CHECK-LABEL: test_sdiv64:
10; CHECK: cqto
11; CHECK: idivq
12
13define i64 @test_srem64(i64 %dividend, i64 %divisor) nounwind {
14entry:
15  %result = srem i64 %dividend, %divisor
16  ret i64 %result
17}
18
19; CHECK-LABEL: test_srem64:
20; CHECK: cqto
21; CHECK: idivq
22
23define i64 @test_udiv64(i64 %dividend, i64 %divisor) nounwind {
24entry:
25  %result = udiv i64 %dividend, %divisor
26  ret i64 %result
27}
28
29; CHECK-LABEL: test_udiv64:
30; CHECK: xorl
31; CHECK: divq
32
33define i64 @test_urem64(i64 %dividend, i64 %divisor) nounwind {
34entry:
35  %result = urem i64 %dividend, %divisor
36  ret i64 %result
37}
38
39; CHECK-LABEL: test_urem64:
40; CHECK: xorl
41; CHECK: divq
42