Dan Gohman | 4298d2e | 2010-01-26 19:25:59 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s |
Nick Lewycky | ef94749 | 2007-11-20 08:24:44 +0000 | [diff] [blame] | 2 | ; PR1810 |
| 3 | |
| 4 | define void @fun() { |
| 5 | entry: |
| 6 | br label %header |
| 7 | header: |
| 8 | %i = phi i32 [ 1, %entry ], [ %i.next, %body ] |
| 9 | %cond = icmp eq i32 %i, 10 |
| 10 | br i1 %cond, label %exit, label %body |
| 11 | body: |
| 12 | %a = mul i32 %i, 5 |
| 13 | %b = or i32 %a, 1 |
| 14 | %i.next = add i32 %i, 1 |
| 15 | br label %header |
| 16 | exit: |
| 17 | ret void |
| 18 | } |
Edward O'Callaghan | 8af43fb | 2009-10-27 14:54:46 +0000 | [diff] [blame] | 19 | |
| 20 | ; CHECK: --> %b |
| 21 | |