; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc < %s -mtriple=m68k-linux --mcpu M68020 | FileCheck %s
define i32 @mul32(i32 %A, i32 %B) {
; CHECK-LABEL: mul32:
; CHECK: .cfi_startproc
; CHECK-NEXT: ; %bb.0:
; CHECK-NEXT: move.l (8,%sp), %d1
; CHECK-NEXT: move.l (4,%sp), %d0
; CHECK-NEXT: muls.l %d1, %d0
; CHECK-NEXT: rts
%mul = mul i32 %A, %B
ret i32 %mul
}
define i32 @sdiv_32(i32 %A, i32 %B) {
; CHECK-LABEL: sdiv_32:
; CHECK: .cfi_startproc
; CHECK-NEXT: ; %bb.0:
; CHECK-NEXT: move.l (8,%sp), %d1
; CHECK-NEXT: move.l (4,%sp), %d0
; CHECK-NEXT: divs.l %d1, %d0
; CHECK-NEXT: rts
%div = sdiv i32 %A, %B
ret i32 %div
}
define i32 @udiv32(i32 %A, i32 %B) {
; CHECK-LABEL: udiv32:
; CHECK: .cfi_startproc
; CHECK-NEXT: ; %bb.0:
; CHECK-NEXT: move.l (8,%sp), %d1
; CHECK-NEXT: move.l (4,%sp), %d0
; CHECK-NEXT: divu.l %d1, %d0
; CHECK-NEXT: rts
%div = udiv i32 %A, %B
ret i32 %div
}