mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 06:38:44 +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
19 lines
386 B
LLVM
19 lines
386 B
LLVM
; RUN: llc < %s -march=avr | FileCheck %s
|
|
|
|
define i8 @trunc8_loreg(i16 %x, i16 %y) {
|
|
; CHECK-LABEL: trunc8_loreg:
|
|
; CHECK: mov r24, r22
|
|
; CHECK-NEXT: ret
|
|
%conv = trunc i16 %y to i8
|
|
ret i8 %conv
|
|
}
|
|
|
|
define i8 @trunc8_hireg(i16 %x, i16 %y) {
|
|
; CHECK-LABEL: trunc8_hireg:
|
|
; CHECK: mov r24, r23
|
|
; CHECK-NEXT: ret
|
|
%shr1 = lshr i16 %y, 8
|
|
%conv = trunc i16 %shr1 to i8
|
|
ret i8 %conv
|
|
}
|