Avoid using lossy load / stores for memcpy / memset expansion. e.g.

f64 load / store on non-SSE2 x86 targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169944 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2012-12-12 00:42:09 +00:00
parent d0a0d221da
commit 61f4dfe369
7 changed files with 58 additions and 17 deletions

View File

@@ -716,6 +716,15 @@ public:
return MVT::Other;
}
/// isLegalMemOpType - Returns true if it's legal to use load / store of the
/// specified type to expand memcpy / memset inline. This is mostly true
/// for legal types except for some special cases. For example, on X86
/// targets without SSE2 f64 load / store are done with fldl / fstpl which
/// also does type conversion.
virtual bool isLegalMemOpType(MVT VT) const {
return VT.isInteger();
}
/// usesUnderscoreSetJmp - Determine if we should use _setjmp or setjmp
/// to implement llvm.setjmp.
bool usesUnderscoreSetJmp() const {