[PATCH] D14056: InstCombine: fix sinking of convergent calls
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 08:09:35 PDT 2015
Might be nice to share the logic with Sink.cpp, I guess it would hinge on
an appropriate name for a predicate.
On Monday, October 26, 2015, escha via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151026/04f31bd1/attachment.html>
More information about the llvm-commits
mailing list