diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-04-08 07:37:57 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-08 07:37:57 +0000 |
| commit | 6371648280456bf7052b8a6f4ee03cfdf2094fe6 (patch) | |
| tree | f3b7545cc43d3f374b20ac331424afc413d83d70 /lib/Target/PowerPC/PPCISelLowering.cpp | |
| parent | 4d281e2aa24eac6197ad0510b8d6213c25f6aa7b (diff) | |
| download | external_llvm-6371648280456bf7052b8a6f4ee03cfdf2094fe6.zip external_llvm-6371648280456bf7052b8a6f4ee03cfdf2094fe6.tar.gz external_llvm-6371648280456bf7052b8a6f4ee03cfdf2094fe6.tar.bz2 | |
Avoid using f64 to lower memcpy from constant string. It's cheaper to use i32 store of immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCISelLowering.cpp')
| -rw-r--r-- | lib/Target/PowerPC/PPCISelLowering.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index 9cd01be..992cc5a 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/lib/Target/PowerPC/PPCISelLowering.cpp @@ -5547,11 +5547,14 @@ PPCTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { /// probably because the source does not need to be loaded. If /// 'NonScalarIntSafe' is true, that means it's safe to return a /// non-scalar-integer type, e.g. empty string source, constant, or loaded -/// from memory. It returns EVT::Other if SelectionDAG should be responsible -/// for determining it. +/// from memory. 'MemcpyStrSrc' indicates whether the memcpy source is +/// constant so it does not need to be loaded. +/// It returns EVT::Other if SelectionDAG should be responsible for +/// determining the type. EVT PPCTargetLowering::getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, bool NonScalarIntSafe, + bool MemcpyStrSrc, SelectionDAG &DAG) const { if (this->PPCSubTarget.isPPC64()) { return MVT::i64; |
