summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
diff options
context:
space:
mode:
authorBjorn Steinbrink <bsteinbr@gmail.com>2015-02-08 17:07:14 +0000
committerBjorn Steinbrink <bsteinbr@gmail.com>2015-02-08 17:07:14 +0000
commit5ec75227717620e4716dc858178166767926573e (patch)
treec43c49eac870d6f60c58651d5faa4ef021e3238a /llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
parentb928d4c2fcd9ce276230f586751ecbaa9823d1b7 (diff)
downloadbcm5719-llvm-5ec75227717620e4716dc858178166767926573e.tar.gz
bcm5719-llvm-5ec75227717620e4716dc858178166767926573e.zip
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/Vectorize/SLPVectorizer.cpp')
-rw-r--r--llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index d1a843828c3..38763beb744 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -217,6 +217,8 @@ static Instruction *propagateMetadata(Instruction *I, ArrayRef<Value *> VL) {
MD = MDNode::getMostGenericTBAA(MD, IMD);
break;
case LLVMContext::MD_alias_scope:
+ MD = MDNode::getMostGenericAliasScope(MD, IMD);
+ break;
case LLVMContext::MD_noalias:
MD = MDNode::intersect(MD, IMD);
break;
OpenPOWER on IntegriCloud