diff options
author | Chris Lattner <sabre@nondot.org> | 2013-01-05 16:44:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2013-01-05 16:44:07 +0000 |
commit | 261304248f4f2cd0d9f0f85f91d400bcedeb0f45 (patch) | |
tree | be6b45477f82e5690c5a232673520fef39785f7d /lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | |
parent | e4b4edd72ae596ac8d1fdbc6e77f61e331f6775d (diff) |
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
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. |