1 ; RUN: llc -mattr=mul,movw < %s -march=avr | FileCheck %s
3 ; Unsigned 8-bit remision
4 define i8 @urem8(i8 %a, i8 %b) {
6 ; CHECK: call __udivmodqi4
7 ; CHECK-NEXT: mov r24, r25
13 ; Signed 8-bit remision
14 define i8 @srem8(i8 %a, i8 %b) {
16 ; CHECK: call __divmodqi4
17 ; CHECK-NEXT: mov r24, r25
23 ; Unsigned 16-bit remision
24 define i16 @urem16(i16 %a, i16 %b) {
25 ; CHECK-LABEL: urem16:
26 ; CHECK: call __udivmodhi4
28 %rem = urem i16 %a, %b
32 ; Signed 16-bit remision
33 define i16 @srem16(i16 %a, i16 %b) {
34 ; CHECK-LABEL: srem16:
35 ; CHECK: call __divmodhi4
37 %rem = srem i16 %a, %b
41 ; Unsigned 32-bit remision
42 define i32 @urem32(i32 %a, i32 %b) {
43 ; CHECK-LABEL: urem32:
44 ; CHECK: call __udivmodsi4
46 %rem = urem i32 %a, %b
50 ; Signed 32-bit remision
51 define i32 @srem32(i32 %a, i32 %b) {
52 ; CHECK-LABEL: srem32:
53 ; CHECK: call __divmodsi4
55 %rem = srem i32 %a, %b