diff options
author | Bjorn Steinbrink <bsteinbr@gmail.com> | 2015-02-08 17:07:14 +0000 |
---|---|---|
committer | Bjorn Steinbrink <bsteinbr@gmail.com> | 2015-02-08 17:07:14 +0000 |
commit | 5ec75227717620e4716dc858178166767926573e (patch) | |
tree | c43c49eac870d6f60c58651d5faa4ef021e3238a /llvm/lib/Transforms/Utils/Local.cpp | |
parent | b928d4c2fcd9ce276230f586751ecbaa9823d1b7 (diff) | |
download | llvm-5ec75227717620e4716dc858178166767926573e.zip llvm-5ec75227717620e4716dc858178166767926573e.tar.gz llvm-5ec75227717620e4716dc858178166767926573e.tar.bz2 |
Correctly combine alias.scope metadata by a union instead of intersecting
Summary:
The alias.scope metadata represents sets of things an instruction might
alias with. When generically combining the metadata from two
instructions the result must be the union of the original sets, because
the new instruction might alias with anything any of the original
instructions aliased with.
Reviewers: hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7490
llvm-svn: 228525
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 648d605..c2dfaf5 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1334,6 +1334,8 @@ void llvm::combineMetadata(Instruction *K, const Instruction *J, ArrayRef<unsign K->setMetadata(Kind, MDNode::getMostGenericTBAA(JMD, KMD)); break; case LLVMContext::MD_alias_scope: + K->setMetadata(Kind, MDNode::getMostGenericAliasScope(JMD, KMD)); + break; case LLVMContext::MD_noalias: K->setMetadata(Kind, MDNode::intersect(JMD, KMD)); break; |