[PATCH] D14056: InstCombine: fix sinking of convergent calls
escha via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 00:17:20 PDT 2015
escha created this revision.
escha added reviewers: resistor, arsenm.
escha added a subscriber: llvm-commits.
escha set the repository for this revision to rL LLVM.
Repository:
rL LLVM
http://reviews.llvm.org/D14056
Files:
lib/Transforms/InstCombine/InstructionCombining.cpp
Index: lib/Transforms/InstCombine/InstructionCombining.cpp
===================================================================
--- lib/Transforms/InstCombine/InstructionCombining.cpp
+++ lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2681,6 +2681,12 @@
&DestBlock->getParent()->getEntryBlock())
return false;
+ // Do not sink convergent call instructions.
+ if (auto *CI = dyn_cast<CallInst>(I)) {
+ if (CI->isConvergent())
+ return false;
+ }
+
// We can only sink load instructions if there is nothing between the load and
// the end of block that could change the value.
if (I->mayReadFromMemory()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14056.38376.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151026/2a839fd3/attachment.bin>
More information about the llvm-commits
mailing list