diff options
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 7388e713e5..337cfe32a8 100644 --- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -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. |