blob: 4ab2f39a2810af43cb8d1a9d6a490fd7039ad4f1 [file] [log] [blame]
Dan Gohman8a977e22010-01-26 19:25:59 +00001; RUN: opt < %s -scalar-evolution -analyze \
Chandler Carruth4177e6f2012-07-02 12:47:22 +00002; RUN: | grep "\--> (zext i4 (-8 + (trunc i64 (8 \* %x) to i4)) to i64)"
Dan Gohman3034c102009-06-17 01:22:39 +00003
Dan Gohman82052832009-06-18 00:00:20 +00004; ScalarEvolution shouldn't try to analyze %z into something like
Dan Gohman3034c102009-06-17 01:22:39 +00005; --> (zext i4 (-1 + (-1 * (trunc i64 (8 * %x) to i4))) to i64)
6
7define 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}