mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
cf739e729e
If we would allow register coalescing on PTRDISPREGS class then register allocator can lock Z register to some virtual register. Larger instructions requiring a memory acces then fail during the register allocation phase since there is no available register to hold a pointer if Y register was already taken for a stack frame. This patch prevents it by keeping Z register spillable. It does it by not allowing coalescer to lock it. Original discussion on https://github.com/avr-rust/rust/issues/128. llvm-svn: 362298
14 lines
400 B
LLVM
14 lines
400 B
LLVM
; RUN: llc -mattr=avr6,sram < %s -march=avr | FileCheck %s
|
|
|
|
; CHECK: ld {{r[0-9]+}}, [[PTR:[XYZ]]]
|
|
; CHECK: ldd {{r[0-9]+}}, [[PTR]]+1
|
|
; CHECK: st [[PTR2:[XYZ]]], {{r[0-9]+}}
|
|
; CHECK: std [[PTR2]]+1, {{r[0-9]+}}
|
|
define void @load_store_16(i16* nocapture %ptr) local_unnamed_addr #1 {
|
|
entry:
|
|
%0 = load i16, i16* %ptr, align 2
|
|
%add = add i16 %0, 5
|
|
store i16 %add, i16* %ptr, align 2
|
|
ret void
|
|
}
|