diff options
author | Dan Gohman <gohman@apple.com> | 2009-02-18 17:22:41 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-02-18 17:22:41 +0000 |
commit | 8078b8bddc84eb1e909ebf5488eecbce582db414 (patch) | |
tree | c93e630caf5a103eda3a539c1e610c8a9e12b8b8 /llvm/test/Transforms/IndVarSimplify/preserve-signed-wrap.ll | |
parent | aa0f01929b4e68d92bde178e3ac8c505e2baac17 (diff) | |
download | bcm5719-llvm-8078b8bddc84eb1e909ebf5488eecbce582db414.tar.gz bcm5719-llvm-8078b8bddc84eb1e909ebf5488eecbce582db414.zip |
Use a sign-extend instead of a zero-extend when promoting a
trip count value when the original loop iteration condition is
signed and the canonical induction variable won't undergo signed
overflow. This isn't required for correctness; it just preserves
more information about original loop iteration values.
Add a getTruncateOrSignExtend method to ScalarEvolution,
following getTruncateOrZeroExtend.
llvm-svn: 64918
Diffstat (limited to 'llvm/test/Transforms/IndVarSimplify/preserve-signed-wrap.ll')
-rw-r--r-- | llvm/test/Transforms/IndVarSimplify/preserve-signed-wrap.ll | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/test/Transforms/IndVarSimplify/preserve-signed-wrap.ll b/llvm/test/Transforms/IndVarSimplify/preserve-signed-wrap.ll index 0a91ec88064..930721a85b4 100644 --- a/llvm/test/Transforms/IndVarSimplify/preserve-signed-wrap.ll +++ b/llvm/test/Transforms/IndVarSimplify/preserve-signed-wrap.ll @@ -1,5 +1,6 @@ ; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t -; RUN: grep sext %t | count 1 +; RUN: grep sext %t | count 2 +; RUN: grep { = sext i32 %n to i64} %t ; RUN: grep phi %t | count 1 ; RUN: grep {phi i64} %t |