<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Test case?  Description of problem?<br>
    <br>
    <div class="moz-cite-prefix">On 09/28/2015 10:25 PM, Piotr Padlewski
      via llvm-commits wrote:<br>
    </div>
    <blockquote
cite="mid:differential-rev-PHID-DREV-bcb2x5pkltfujux7x3oe-req@reviews.llvm.org"
      type="cite">
      <pre wrap="">Prazek created this revision.
Prazek added reviewers: rsmith, majnemer, nlewycky.
Prazek added a subscriber: llvm-commits.

<a class="moz-txt-link-freetext" href="http://reviews.llvm.org/D13233">http://reviews.llvm.org/D13233</a>

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);
 
 }


</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>