mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-09 18:55:33 +00:00
d1862af314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12865 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
599 B
Plaintext
20 lines
599 B
Plaintext
; Linear scan does not currently coalesce any two variables that have
|
|
; overlapping live intervals. When two overlapping intervals have the same
|
|
; value, they can be joined though.
|
|
;
|
|
; RUN: llvm-as < %s | llc -march=x86 -regalloc=linearscan | not grep 'mov %[A-Z]\{2,3\}, %[A-Z]\{2,3\}'
|
|
|
|
int %main() {
|
|
%ptr = alloca uint
|
|
br label %Loop
|
|
Loop:
|
|
%I = phi int [0, %0], [%i2, %Loop]
|
|
%i2 = add int %I, 1
|
|
%i3 = cast int %i2 to uint
|
|
store uint %i3, uint* %ptr
|
|
%C = seteq int %i2, 10
|
|
br bool %C, label %Out, label %Loop
|
|
Out:
|
|
ret int 0
|
|
}
|