mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 21:45:16 +00:00
7b7d569297
Summary: A lot of the pseudo instructions are required because LLVM assumes that all integers of the same size as the pointer size are legal. This means that it will not currently expand 16-bit instructions to their 8-bit variants because it thinks 16-bit types are legal for the operations. This also adds all of the CodeGen tests that required the pass to run. Reviewers: arsenm, kparzysz Subscribers: wdng, mgorny, modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D26577 llvm-svn: 287162
32 lines
532 B
LLVM
32 lines
532 B
LLVM
; RUN: llc < %s -march=avr | FileCheck %s
|
|
|
|
; zext R25:R24, R24
|
|
; eor R25, R25
|
|
define i16 @zext1(i8 %x) {
|
|
; CHECK-LABEL: zext1:
|
|
; CHECK: eor r25, r25
|
|
%1 = zext i8 %x to i16
|
|
ret i16 %1
|
|
}
|
|
|
|
; zext R25:R24, R20
|
|
; mov R24, R20
|
|
; eor R25, R25
|
|
define i16 @zext2(i8 %x, i8 %y) {
|
|
; CHECK-LABEL: zext2:
|
|
; CHECK: mov r24, r22
|
|
; CHECK: eor r25, r25
|
|
%1 = zext i8 %y to i16
|
|
ret i16 %1
|
|
}
|
|
|
|
; zext R25:R24, R24
|
|
; eor R25, R25
|
|
define i16 @zext_i1(i1 %x) {
|
|
; CHECK-LABEL: zext_i1:
|
|
; CHECK: eor r25, r25
|
|
%1 = zext i1 %x to i16
|
|
ret i16 %1
|
|
}
|
|
|