blob: 8541af4176e61e70073518ba7bb1a5c55d01e1fd [file] [log] [blame]
Dan Gohman1b4c27772009-09-08 16:50:01 +00001; RUN: opt %s -scalar-evolution -disable-output -analyze \
Dan Gohmaned1d8bb2009-06-18 00:00:20 +00002; RUN: | grep {\\--> (zext i4 (-8 + (trunc i64 (8 \\* %x) to i4)) to i64)}
Dan Gohmane49ae432009-06-17 01:22:39 +00003
Dan Gohmaned1d8bb2009-06-18 00:00:20 +00004; ScalarEvolution shouldn't try to analyze %z into something like
Dan Gohmane49ae432009-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}