mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-24 21:42:54 +02: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
26 lines
610 B
LLVM
26 lines
610 B
LLVM
; RUN: llc -mattr=avr6 < %s -march=avr | FileCheck %s
|
|
|
|
; CHECK-LABEL: atomic_store16
|
|
; CHECK: in r0, 63
|
|
; CHECK-NEXT: cli
|
|
; CHECK-NEXT: st [[RD:(X|Y|Z)]], [[RR:r[0-9]+]]
|
|
; CHECK-NEXT: std [[RD:(X|Y|Z)]]+1, [[RR:r[0-9]+]]
|
|
; CHECK-NEXT: out 63, r0
|
|
define void @atomic_store16(i16* %foo) {
|
|
store atomic i16 1, i16* %foo unordered, align 2
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: monotonic
|
|
; CHECK: in r0, 63
|
|
; CHECK-NEXT: cli
|
|
; CHECK-NEXT: st Z, r24
|
|
; CHECK-NEXT: std Z+1, r25
|
|
; CHECK-NEXT: out 63, r0
|
|
define void @monotonic(i16) {
|
|
entry-block:
|
|
store atomic i16 %0, i16* undef monotonic, align 2
|
|
ret void
|
|
}
|
|
|