[PATCH] D12992: invariant.group handling in GVN

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 20:36:30 PDT 2015


Prazek added inline comments.

================
Comment at: lib/Transforms/Utils/Local.cpp:1432-1433
@@ +1431,4 @@
+  if (auto *JMD = J->getMetadata(LLVMContext::MD_invariant_group))
+    if (isa<LoadInst>(K) || isa<StoreInst>(K))
+      K->setMetadata(LLVMContext::MD_invariant_group, JMD);
+
----------------
It won't work because we iterate over K metadata


http://reviews.llvm.org/D12992





More information about the llvm-commits mailing list