diff options
author | Chris Lattner <sabre@nondot.org> | 2011-04-26 17:41:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-04-26 17:41:02 +0000 |
commit | 9750acc079409e52f6563636a112a9de50749b30 (patch) | |
tree | c4de4b907fe534490798165a404b1318159760e6 /test/Transforms/GVN | |
parent | a61e73bda5125c28e48b52e573d115370838596b (diff) | |
download | llvm-9750acc079409e52f6563636a112a9de50749b30.tar.gz llvm-9750acc079409e52f6563636a112a9de50749b30.tar.bz2 llvm-9750acc079409e52f6563636a112a9de50749b30.tar.xz |
Improve the bail-out predicate to really only kick in when phi
translation fails. We were bailing out in some cases that would
cause us to miss GVN'ing some non-local cases away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130206 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GVN')
-rw-r--r-- | test/Transforms/GVN/rle.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Transforms/GVN/rle.ll b/test/Transforms/GVN/rle.ll index 42363d8bb2..11e207cda0 100644 --- a/test/Transforms/GVN/rle.ll +++ b/test/Transforms/GVN/rle.ll @@ -570,4 +570,27 @@ entry: } +; Cross block partial alias case. +define i32 @load_load_partial_alias_cross_block(i8* %P) nounwind ssp { +entry: + %xx = bitcast i8* %P to i32* + %x1 = load i32* %xx, align 4 + %cmp = icmp eq i32 %x1, 127 + br i1 %cmp, label %land.lhs.true, label %if.end + +land.lhs.true: ; preds = %entry + %arrayidx4 = getelementptr inbounds i8* %P, i64 1 + %tmp5 = load i8* %arrayidx4, align 1 + %conv6 = zext i8 %tmp5 to i32 + ret i32 %conv6 + +if.end: + ret i32 52 +; CHECK: @load_load_partial_alias_cross_block +; CHECK: land.lhs.true: +; CHECK-NOT: load i8 +; CHECK: ret i32 %conv6 +} + + |