diff options
| author | Arnold Schwaighofer <aschwaighofer@apple.com> | 2014-01-02 03:31:36 +0000 |
|---|---|---|
| committer | Arnold Schwaighofer <aschwaighofer@apple.com> | 2014-01-02 03:31:36 +0000 |
| commit | 0d10a9d5796d278e396c26388165e2eec81f5233 (patch) | |
| tree | 0fc14d330b021f5f9b25b036d92ef16bbf520e94 /llvm/test/Analysis/GlobalsModRef | |
| parent | 18787628a7ef9a06e26276f0d9c2ef60854f5816 (diff) | |
| download | bcm5719-llvm-0d10a9d5796d278e396c26388165e2eec81f5233.tar.gz bcm5719-llvm-0d10a9d5796d278e396c26388165e2eec81f5233.zip | |
BasicAA: Fix value equality and phi cycles
When there are cycles in the value graph we have to be careful interpreting
"Value*" identity as "value" equivalence. We interpret the value of a phi node
as the value of its operands.
When we check for value equivalence now we make sure that the "Value*" dominates
all cycles (phis).
%0 = phi [%noaliasval, %addr2]
%l = load %ptr
%addr1 = gep @a, 0, %l
%addr2 = gep @a, 0, (%l + 1)
store %ptr ...
Before this patch we would return NoAlias for (%0, %addr1) which is wrong
because the value of the load is from different iterations of the loop.
Tested on x86_64 -mavx at O3 and O3 -flto with no performance or compile time
regressions.
PR18068
radar://15653794
llvm-svn: 198290
Diffstat (limited to 'llvm/test/Analysis/GlobalsModRef')
| -rw-r--r-- | llvm/test/Analysis/GlobalsModRef/aliastest.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Analysis/GlobalsModRef/aliastest.ll b/llvm/test/Analysis/GlobalsModRef/aliastest.ll index 4cfed71bfb7..864c516ec95 100644 --- a/llvm/test/Analysis/GlobalsModRef/aliastest.ll +++ b/llvm/test/Analysis/GlobalsModRef/aliastest.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s +; RUN: opt < %s -domtree -basicaa -globalsmodref-aa -gvn -S | FileCheck %s @X = internal global i32 4 ; <i32*> [#uses=1] |

