[PATCH] D12710: InstCombine: Preserve tbaa metadata when merging loads that are phi arguments

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 10:50:55 PDT 2015


hfinkel added a subscriber: hfinkel.

================
Comment at: lib/Transforms/InstCombine/InstCombinePHI.cpp:355
@@ -352,1 +354,3 @@
+  NewLI->setMetadata(LLVMContext::MD_tbaa,
+                     FirstLI->getMetadata(LLVMContext::MD_tbaa));
 
----------------
Why are you preserving only TBAA? I think that you could also preserve here:

  MD_alias_scope
  MD_noalias
  MD_invariant_load
  MD_nonnull

using combineMetadata.



http://reviews.llvm.org/D12710





More information about the llvm-commits mailing list