Alkis Evlogimenos | d1862af | 2004-04-12 15:40:25 +0000 | [diff] [blame^] | 1 | ; Linear scan does not currently coalesce any two variables that have |
| 2 | ; overlapping live intervals. When two overlapping intervals have the same |
| 3 | ; value, they can be joined though. |
| 4 | ; |
| 5 | ; RUN: llvm-as < %s | llc -march=x86 -regalloc=linearscan | not grep 'mov %[A-Z]\{2,3\}, %[A-Z]\{2,3\}' |
| 6 | |
| 7 | int %main() { |
| 8 | %ptr = alloca uint |
| 9 | br label %Loop |
| 10 | Loop: |
| 11 | %I = phi int [0, %0], [%i2, %Loop] |
| 12 | %i2 = add int %I, 1 |
| 13 | %i3 = cast int %i2 to uint |
| 14 | store uint %i3, uint* %ptr |
| 15 | %C = seteq int %i2, 10 |
| 16 | br bool %C, label %Out, label %Loop |
| 17 | Out: |
| 18 | ret int 0 |
| 19 | } |