diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-02-14 07:11:24 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-02-14 07:11:24 +0000 |
commit | 95f0ba2703b2a49fb6f2373703fb42915774ee94 (patch) | |
tree | 21d22a6ce5b3e30a581839c80b25ef8ae6dd4db6 /lib | |
parent | dcd188d33fdaff8cea019ebd64e3a3d2b1a700c0 (diff) |
Fix PR2032. Inform the alias analysis of changes to the underlying program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 95bb0ddfbc..41a23ed6c7 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -857,6 +857,8 @@ Value *GVN::GetValueForBlock(BasicBlock *BB, LoadInst* orig, PN->addIncoming(val, *PI); } + AliasAnalysis& AA = getAnalysis<AliasAnalysis>(); + AA.copyValue(orig, PN); // Attempt to collapse PHI nodes that are trivially redundant Value* v = CollapsePhi(PN); |