diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-04-02 19:36:14 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-02 19:36:14 +0000 |
commit | f28f8bc40eedc6304ab25dd8bed486fa08f51f70 (patch) | |
tree | d99c6dd81a1c9d1342237e699bcb3a90e4321680 /lib/Target/PowerPC/PPCISelLowering.cpp | |
parent | cf5862d8ac9562e633e6ef7cb55e67c2b7ca9c0a (diff) | |
download | external_llvm-f28f8bc40eedc6304ab25dd8bed486fa08f51f70.zip external_llvm-f28f8bc40eedc6304ab25dd8bed486fa08f51f70.tar.gz external_llvm-f28f8bc40eedc6304ab25dd8bed486fa08f51f70.tar.bz2 |
Correctly lower memset / memcpy of undef. It should be a nop. PR6767.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCISelLowering.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index e67666d..337b0d7 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/lib/Target/PowerPC/PPCISelLowering.cpp @@ -5540,15 +5540,18 @@ PPCTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { } /// getOptimalMemOpType - Returns the target specific optimal type for load -/// and store operations as a result of memset, memcpy, and memmove lowering. -/// If DstAlign is zero that means it's safe to destination alignment can -/// satisfy any constraint. Similarly if SrcAlign is zero it means there -/// isn't a need to check it against alignment requirement, probably because -/// the source does not need to be loaded. It returns EVT::Other if -/// SelectionDAG should be responsible for determining it. +/// and store operations as a result of memset, memcpy, and memmove +/// lowering. If DstAlign is zero that means it's safe to destination +/// alignment can satisfy any constraint. Similarly if SrcAlign is zero it +/// means there isn't a need to check it against alignment requirement, +/// 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. EVT PPCTargetLowering::getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, - bool SafeToUseFP, + bool NonScalarIntSafe, SelectionDAG &DAG) const { if (this->PPCSubTarget.isPPC64()) { return MVT::i64; |