1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Add same value coalescing testcase

llvm-svn: 12865
This commit is contained in:
Alkis Evlogimenos 2004-04-12 15:40:25 +00:00
parent 4c409cc2c4
commit 45bb1bbd1b

View File

@ -0,0 +1,19 @@
; 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
}