1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s
4 define i8 @sdiv_neg_neg_high_bits(i8 %x, i8 %y) {
5 ; CHECK-LABEL: sdiv_neg_neg_high_bits:
7 ; CHECK-NEXT: xorl %eax, %eax
10 %denum = or i8 %y, 131
11 %div = sdiv i8 %num, %denum
16 define i8 @sdiv_exact_odd_odd(i8 %x, i8 %y) {
17 ; CHECK-LABEL: sdiv_exact_odd_odd:
19 ; CHECK-NEXT: movb $1, %al
23 %div = sdiv exact i8 %num, %denum
28 define i8 @sdiv_exact_even_even_fail_unknown(i8 %x, i8 %y) {
29 ; CHECK-LABEL: sdiv_exact_even_even_fail_unknown:
31 ; CHECK-NEXT: andb $-2, %dil
32 ; CHECK-NEXT: andb $-2, %sil
33 ; CHECK-NEXT: movsbl %dil, %eax
34 ; CHECK-NEXT: idivb %sil
35 ; CHECK-NEXT: andb $1, %al
38 %denum = and i8 %y, -2
39 %div = sdiv exact i8 %num, %denum
44 define i8 @udiv_exact_even_odd(i8 %x, i8 %y) {
45 ; CHECK-LABEL: udiv_exact_even_odd:
47 ; CHECK-NEXT: xorl %eax, %eax
51 %div = udiv exact i8 %num, %denum
56 define i8 @udiv_exact_even_even_fail_unknown(i8 %x, i8 %y) {
57 ; CHECK-LABEL: udiv_exact_even_even_fail_unknown:
59 ; CHECK-NEXT: andb $-2, %dil
60 ; CHECK-NEXT: andb $-2, %sil
61 ; CHECK-NEXT: movzbl %dil, %eax
62 ; CHECK-NEXT: divb %sil
63 ; CHECK-NEXT: andb $1, %al
66 %denum = and i8 %y, -2
67 %div = udiv exact i8 %num, %denum