diff options
author | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-11 01:45:32 +0000 |
---|---|---|
committer | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-11 01:45:32 +0000 |
commit | 8fa56c49dfc7c219ba37281145d73fd724941715 (patch) | |
tree | 541b0da95eedda37f85d8dd152330cdfb27c28f2 /llvm/lib/Transforms | |
parent | e90cc03a85ea3b4da1462c83960aa996b359ed32 (diff) | |
download | bcm5719-llvm-8fa56c49dfc7c219ba37281145d73fd724941715.tar.gz bcm5719-llvm-8fa56c49dfc7c219ba37281145d73fd724941715.zip |
[Attributor][FIX] Do not replace musstail calls with constant
llvm-svn: 374498
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/Attributor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index c6de94beaf0..4b393539813 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -997,7 +997,7 @@ ChangeStatus AAReturnedValuesImpl::manifest(Attributor &A) { // Callback to replace the uses of CB with the constant C. auto ReplaceCallSiteUsersWith = [](CallBase &CB, Constant &C) { - if (CB.getNumUses() == 0) + if (CB.getNumUses() == 0 || CB.isMustTailCall()) return ChangeStatus::UNCHANGED; CB.replaceAllUsesWith(&C); return ChangeStatus::CHANGED; |