[PATCH] D12246: [NVPTX] change threading intrinsics from noduplicate to convergent

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 13:42:35 PDT 2015


arsenm added a subscriber: arsenm.

================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:276
@@ -275,3 +275,3 @@
     if (const CallInst *CI = dyn_cast<CallInst>(I)) {
-      if (CI->cannotDuplicate())
+      if (CI->cannotDuplicate() || CI->hasFnAttr(Attribute::Convergent))
         // Blocks with NoDuplicate are modelled as having infinite cost, so they
----------------
Can you factor this into a CI->isConvergent()?


http://reviews.llvm.org/D12246





More information about the llvm-commits mailing list