mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228525 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user