2013-08-06 07:43:18 +08:00
|
|
|
; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
|
2009-06-17 09:22:39 +08:00
|
|
|
|
2009-06-18 08:00:20 +08:00
|
|
|
; ScalarEvolution shouldn't try to analyze %z into something like
|
2009-06-17 09:22:39 +08:00
|
|
|
; --> (zext i4 (-1 + (-1 * (trunc i64 (8 * %x) to i4))) to i64)
|
|
|
|
|
2013-08-06 07:43:18 +08:00
|
|
|
; CHECK: --> (zext i4 (-8 + (trunc i64 (8 * %x) to i4)) to i64)
|
|
|
|
|
2009-06-17 09:22:39 +08:00
|
|
|
define i64 @foo(i64 %x) {
|
|
|
|
%a = shl i64 %x, 3
|
|
|
|
%t = and i64 %a, 8
|
|
|
|
%z = xor i64 %t, 8
|
|
|
|
ret i64 %z
|
|
|
|
}
|