aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorMomchil Velikov <momchil.velikov@arm.com>2023-03-23 17:16:31 +0000
committerMomchil Velikov <momchil.velikov@arm.com>2023-03-23 17:31:09 +0000
commit6a2a5f08de0a09171bb92f91cd7b9deea97f6cce (patch)
tree994a95e9869cf67c0c63e185b7a35f6c65fed976 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parent101cfe18f7b80801be3e415ad62acfc57960ad90 (diff)
downloadllvm-6a2a5f08de0a09171bb92f91cd7b9deea97f6cce.zip
llvm-6a2a5f08de0a09171bb92f91cd7b9deea97f6cce.tar.gz
llvm-6a2a5f08de0a09171bb92f91cd7b9deea97f6cce.tar.bz2
[CodeGenPrepare] Don't give up if unable to sink first arg to a cold call
Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D143892
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 8d11f28..b571b5a 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -2279,7 +2279,8 @@ bool CodeGenPrepare::optimizeCallInst(CallInst *CI, ModifyDT &ModifiedDT) {
if (!Arg->getType()->isPointerTy())
continue;
unsigned AS = Arg->getType()->getPointerAddressSpace();
- return optimizeMemoryInst(CI, Arg, Arg->getType(), AS);
+ if (optimizeMemoryInst(CI, Arg, Arg->getType(), AS))
+ return true;
}
IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI);