Dan Gohman | 4298d2e | 2010-01-26 19:25:59 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -scalar-evolution -analyze \ |
Dan Gohman | ed1d8bb | 2009-06-18 00:00:20 +0000 | [diff] [blame] | 2 | ; RUN: | grep {\\--> (zext i4 (-8 + (trunc i64 (8 \\* %x) to i4)) to i64)} |
Dan Gohman | e49ae43 | 2009-06-17 01:22:39 +0000 | [diff] [blame] | 3 | |
Dan Gohman | ed1d8bb | 2009-06-18 00:00:20 +0000 | [diff] [blame] | 4 | ; ScalarEvolution shouldn't try to analyze %z into something like |
Dan Gohman | e49ae43 | 2009-06-17 01:22:39 +0000 | [diff] [blame] | 5 | ; --> (zext i4 (-1 + (-1 * (trunc i64 (8 * %x) to i4))) to i64) |
| 6 | |
| 7 | define i64 @foo(i64 %x) { |
| 8 | %a = shl i64 %x, 3 |
| 9 | %t = and i64 %a, 8 |
| 10 | %z = xor i64 %t, 8 |
| 11 | ret i64 %z |
| 12 | } |