projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cec7b16
)
InstCombine: fix sinking of convergent calls
author
Fiona Glaser
<escha@apple.com>
Tue, 3 Nov 2015 22:23:39 +0000
(22:23 +0000)
committer
Fiona Glaser
<escha@apple.com>
Tue, 3 Nov 2015 22:23:39 +0000
(22:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251991
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/InstCombine/InstructionCombining.cpp
b/lib/Transforms/InstCombine/InstructionCombining.cpp
index b51ec291f9134bc6556e5d3eff8ab8138450cdf4..ac535f97bb1c6f15edfeba800fe36160eda22d15 100644
(file)
--- a/
lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/
lib/Transforms/InstCombine/InstructionCombining.cpp
@@
-2694,6
+2694,12
@@
static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) {
&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()) {