aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/ScalarEvolution
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-06-18 00:00:20 +0000
committerDan Gohman <gohman@apple.com>2009-06-18 00:00:20 +0000
commit820528331fbcc0db2149edc0b143753665bc00bf (patch)
tree399b71a26dfc56bcd1f0eea8764ab4c4f9c6617f /test/Analysis/ScalarEvolution
parentfc3641b07a95f649424ee5009a4bed001b5bea62 (diff)
Teach ScalarEvolution how to recognize another xor(and(x, C), C) case.
If C is a single bit and the and gets analyzed as a truncate and zero-extend, the xor can be represnted as an add. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/ScalarEvolution')
-rw-r--r--test/Analysis/ScalarEvolution/xor-and.ll5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Analysis/ScalarEvolution/xor-and.ll b/test/Analysis/ScalarEvolution/xor-and.ll
index 9b02bb803f..843052456a 100644
--- a/test/Analysis/ScalarEvolution/xor-and.ll
+++ b/test/Analysis/ScalarEvolution/xor-and.ll
@@ -1,6 +1,7 @@
-; RUN: llvm-as < %s | opt -scalar-evolution -disable-output -analyze | grep {\\--> %z}
+; RUN: llvm-as < %s | opt -scalar-evolution -disable-output -analyze \
+; RUN: | grep {\\--> (zext i4 (-8 + (trunc i64 (8 \\* %x) to i4)) to i64)}
-; ScalarEvolution shouldn't try to analyze %s into something like
+; ScalarEvolution shouldn't try to analyze %z into something like
; --> (zext i4 (-1 + (-1 * (trunc i64 (8 * %x) to i4))) to i64)
define i64 @foo(i64 %x) {