[PATCH] D13233: Combining invariant.group metadata bugfix

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 06:13:05 PDT 2015


Test case?  Description of problem?

On 09/28/2015 10:25 PM, Piotr Padlewski via llvm-commits wrote:
> Prazek created this revision.
> Prazek added reviewers: rsmith, majnemer, nlewycky.
> Prazek added a subscriber: llvm-commits.
>
> http://reviews.llvm.org/D13233
>
> Files:
>    lib/Transforms/Utils/Local.cpp
>
> Index: lib/Transforms/Utils/Local.cpp
> ===================================================================
> --- lib/Transforms/Utils/Local.cpp
> +++ lib/Transforms/Utils/Local.cpp
> @@ -1426,7 +1426,8 @@
>     // then we will just pick it from J - even when they are different.
>     // FIXME: we should try to preserve both invariant.group md if they are
>     // different, but right now instruction can only have one invariant.group.
> -  if (auto *JMD = J->getMetadata(LLVMContext::MD_invariant_group))
> +  if (auto *JMD = J->getMetadata(LLVMContext::MD_invariant_group) &&
> +      isa<LoadInst>(K))
>       K->setMetadata(LLVMContext::MD_invariant_group, JMD);
>   
>   }
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150929/ed60de37/attachment.html>


More information about the llvm-commits mailing list