diff options
author | Duncan Sands <baldrick@free.fr> | 2010-11-14 13:30:18 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-11-14 13:30:18 +0000 |
commit | 8df084cc0f43a297d57b414df362676b7a70cfe6 (patch) | |
tree | d3a7b6371ca1c32f8ca737e1dfb5625b7af8b6e5 /test/Transforms/GVN/2010-03-31-RedundantPHIs.ll | |
parent | 4ab30be46f14841c7e11dc91d321f856747051ac (diff) | |
download | external_llvm-8df084cc0f43a297d57b414df362676b7a70cfe6.zip external_llvm-8df084cc0f43a297d57b414df362676b7a70cfe6.tar.gz external_llvm-8df084cc0f43a297d57b414df362676b7a70cfe6.tar.bz2 |
Teach InstructionSimplify about phi nodes. I chose to have it simply
offload the work to hasConstantValue rather than do something more
complicated (such handling mutually recursive phis) because (1) it is
not clear it is worth it; and (2) if it is worth it, maybe such logic
would be better placed in hasConstantValue. Adjust some GVN tests
which are now cleaned up much further (eg: all phi nodes are removed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GVN/2010-03-31-RedundantPHIs.ll')
-rw-r--r-- | test/Transforms/GVN/2010-03-31-RedundantPHIs.ll | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll b/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll index c408daa..d6e1c6b 100644 --- a/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll +++ b/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll @@ -1,5 +1,8 @@ ; RUN: opt < %s -basicaa -gvn -S | FileCheck %s +; CHECK-NOT: load +; CHECK-NOT: phi + define i8* @cat(i8* %s1, ...) nounwind { entry: br i1 undef, label %bb, label %bb3 @@ -29,18 +32,11 @@ bb10: ; preds = %bb8 br label %bb11 bb11: ; preds = %bb10, %bb9 -; CHECK: bb11: -; CHECK: phi -; CHECK-NOT: phi br label %bb12 bb12: ; preds = %bb11, %bb6 -; CHECK: bb12: -; CHECK: phi -; CHECK-NOT: phi br i1 undef, label %bb8, label %bb13 bb13: ; preds = %bb12 -; CHECK: bb13: ret i8* undef } |