mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
619ca04281
Summary: This adds all of the CodeGen tests which currently pass. Reviewers: arsenm, kparzysz Subscribers: japaric, wdng Differential Revision: https://reviews.llvm.org/D26388 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286418 91177308-0d34-0410-b5e6-96231b3b80d8
29 lines
623 B
LLVM
29 lines
623 B
LLVM
; RUN: llc -mattr=mul,movw < %s -march=avr | FileCheck %s
|
|
|
|
define i8 @mult8(i8 %a, i8 %b) {
|
|
; CHECK-LABEL: mult8:
|
|
; CHECK: muls r22, r24
|
|
; CHECK: eor r1, r1
|
|
; CHECK: mov r24, r0
|
|
%mul = mul i8 %b, %a
|
|
ret i8 %mul
|
|
}
|
|
|
|
define i16 @mult16(i16 %a, i16 %b) {
|
|
; CHECK-LABEL: mult16:
|
|
; CHECK: muls r22, r25
|
|
; CHECK: mov r18, r0
|
|
; CHECK: mul r22, r24
|
|
; CHECK: mov r19, r0
|
|
; CHECK: mov r20, r1
|
|
; CHECK: eor r1, r1
|
|
; CHECK: add r20, r18
|
|
; CHECK: muls r23, r24
|
|
; CHECK: eor r1, r1
|
|
; CHECK: mov r22, r0
|
|
; CHECK: add r22, r20
|
|
; :TODO: finish after reworking shift instructions
|
|
%mul = mul nsw i16 %b, %a
|
|
ret i16 %mul
|
|
}
|