diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-12-12 01:32:07 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-12-12 01:32:07 +0000 |
commit | 7d34267df63e23be1957f738de783c145febb7af (patch) | |
tree | bb7a110bd20e45275e9dfb02c9adf192fccb72c4 /lib/Target/ARM/ARMISelLowering.cpp | |
parent | 6c645a35ccc658b20506d3137890d9003edd3527 (diff) |
- Rename isLegalMemOpType to isSafeMemOpType. "Legal" is a very overloade term.
Also added more comments to explain why it is generally ok to return true.
- Rename getOptimalMemOpType argument IsZeroVal to ZeroOrLdSrc. It's meant to
be true for loaded source (memcpy) or zero constants (memset). The poor name
choice is probably some kind of legacy issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index de7159e474..613df7a9b3 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -9450,13 +9450,13 @@ static bool memOpAlign(unsigned DstAlign, unsigned SrcAlign, EVT ARMTargetLowering::getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, - bool IsZeroVal, + bool ZeroOrLdSrc, bool MemcpyStrSrc, MachineFunction &MF) const { const Function *F = MF.getFunction(); // See if we can use NEON instructions for this... - if (IsZeroVal && + if (ZeroOrLdSrc && Subtarget->hasNEON() && !F->getFnAttributes().hasAttribute(Attributes::NoImplicitFloat)) { bool Fast; @@ -9481,10 +9481,6 @@ EVT ARMTargetLowering::getOptimalMemOpType(uint64_t Size, return MVT::Other; } -bool ARMTargetLowering::isLegalMemOpType(MVT VT) const { - return VT.isInteger() || VT == MVT::f64 || VT == MVT::v2f64; -} - bool ARMTargetLowering::isZExtFree(SDValue Val, EVT VT2) const { if (Val.getOpcode() != ISD::LOAD) return false; |