summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp b/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
index 5ec209ada17..835fcf09f0a 100644
--- a/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
@@ -56,9 +56,12 @@ bool AArch64PreLegalizerCombinerInfo::combine(GISelChangeObserver &Observer,
case Intrinsic::memcpy:
case Intrinsic::memmove:
case Intrinsic::memset: {
+ // If we're at -O0 set a maxlen of 32 to inline, otherwise let the other
+ // heuristics decide.
+ unsigned MaxLen = EnableOpt ? 0 : 32;
// Try to inline memcpy type calls if optimizations are enabled.
- return (EnableOpt && !EnableOptSize) ? Helper.tryCombineMemCpyFamily(MI)
- : false;
+ return (!EnableOptSize) ? Helper.tryCombineMemCpyFamily(MI, MaxLen)
+ : false;
}
default:
break;
OpenPOWER on IntegriCloud