[PATCH] D17429: Don't mark convergent instructions as trivially rematerializable.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 17:48:12 PST 2016


jlebar created this revision.
jlebar added a reviewer: echristo.
jlebar added subscribers: tra, llvm-commits.

No testcase, as all convergent MIs I'm aware of already have unmodeled
side-effects, which is sufficient.

http://reviews.llvm.org/D17429

Files:
  lib/CodeGen/TargetInstrInfo.cpp

Index: lib/CodeGen/TargetInstrInfo.cpp
===================================================================
--- lib/CodeGen/TargetInstrInfo.cpp
+++ lib/CodeGen/TargetInstrInfo.cpp
@@ -846,7 +846,7 @@
 
   // Avoid instructions obviously unsafe for remat.
   if (MI->isNotDuplicable() || MI->mayStore() ||
-      MI->hasUnmodeledSideEffects())
+      MI->hasUnmodeledSideEffects() || MI->isConvergent())
     return false;
 
   // Don't remat inline asm. We have no idea how expensive it is


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17429.48440.patch
Type: text/x-patch
Size: 489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160219/b98319a3/attachment.bin>


More information about the llvm-commits mailing list