mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
switch from pointer equality comparison to MDNode::getMostGenericTBAA
when merging two TBAA tags, pointed out by Nuno. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -803,10 +803,10 @@ bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) {
|
||||
NewSI->setDebugLoc(OtherStore->getDebugLoc());
|
||||
|
||||
// If the two stores had the same TBAA tag, preserve it.
|
||||
if (MDNode *TBAATag1 = SI.getMetadata(LLVMContext::MD_tbaa))
|
||||
if (MDNode *TBAATag2 = OtherStore->getMetadata(LLVMContext::MD_tbaa))
|
||||
if (TBAATag1 == TBAATag2)
|
||||
NewSI->setMetadata(LLVMContext::MD_tbaa, TBAATag1);
|
||||
if (MDNode *TBAATag = SI.getMetadata(LLVMContext::MD_tbaa))
|
||||
if ((TBAATag = MDNode::getMostGenericTBAA(TBAATag,
|
||||
OtherStore->getMetadata(LLVMContext::MD_tbaa))))
|
||||
NewSI->setMetadata(LLVMContext::MD_tbaa, TBAATag);
|
||||
|
||||
|
||||
// Nuke the old stores.
|
||||
|
||||
Reference in New Issue
Block a user