Dan Gohman | fce288f | 2009-09-09 00:09:15 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=arm |
| 2 | ; RUN: llc < %s -march=arm | grep cmpne | count 1 |
| 3 | ; RUN: llc < %s -march=arm | grep bx | count 2 |
Evan Cheng | 60c916b | 2007-06-20 18:26:15 +0000 | [diff] [blame] | 4 | |
| 5 | define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) { |
| 6 | switch i32 %c, label %cond_next [ |
| 7 | i32 1, label %cond_true |
| 8 | i32 7, label %cond_true |
| 9 | ] |
| 10 | |
| 11 | cond_true: |
| 12 | %tmp12 = add i32 %a, 1 |
| 13 | %tmp1518 = add i32 %tmp12, %b |
| 14 | ret i32 %tmp1518 |
| 15 | |
| 16 | cond_next: |
| 17 | %tmp15 = add i32 %b, %a |
| 18 | ret i32 %tmp15 |
| 19 | } |