diff options
author | Andrew Trick <atrick@apple.com> | 2011-06-21 03:22:38 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-06-21 03:22:38 +0000 |
commit | 2fabd464ae9fd33f068066e3fc3d0caa7ea2279d (patch) | |
tree | c03f566a9ca6c3263b3d33d4aafcf7481fd69491 /test/Transforms/IndVarSimplify/iv-zext.ll | |
parent | a88a0ca8082006b37d14d8aee4a644b20bae8bc9 (diff) | |
download | external_llvm-2fabd464ae9fd33f068066e3fc3d0caa7ea2279d.zip external_llvm-2fabd464ae9fd33f068066e3fc3d0caa7ea2279d.tar.gz external_llvm-2fabd464ae9fd33f068066e3fc3d0caa7ea2279d.tar.bz2 |
indvars -disable-iv-rewrite: Adds support for eliminating identity
ops.
This is a rewrite of the IV simplification algorithm used by
-disable-iv-rewrite. To avoid perturbing the default mode, I
temporarily split the driver and created SimplifyIVUsersNoRewrite. The
idea is to avoid doing opcode/pattern matching inside
IndVarSimplify. SCEV already does it. We want to optimize with the
full generality of SCEV, but optimize def-use chains top down on-demand rather
than rewriting the entire expression bottom-up. This was easy to do
for operations that SCEV can prove are identity function. So we're now
eliminating bitmasks and zero extends this way.
A result of this rewrite is that indvars -disable-iv-rewrite no longer
requires IVUsers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/IndVarSimplify/iv-zext.ll')
-rw-r--r-- | test/Transforms/IndVarSimplify/iv-zext.ll | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Transforms/IndVarSimplify/iv-zext.ll b/test/Transforms/IndVarSimplify/iv-zext.ll index 00018ec..3a05c89 100644 --- a/test/Transforms/IndVarSimplify/iv-zext.ll +++ b/test/Transforms/IndVarSimplify/iv-zext.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -indvars -S | FileCheck %s +; RUN: opt < %s -indvars -disable-iv-rewrite -S | FileCheck %s ; CHECK-NOT: and ; CHECK-NOT: zext |