Avoid using lossy load / stores for memcpy / memset expansion. e.g.
[oota-llvm.git] / lib / Target / X86 / X86ISelLowering.h
index a515be23ef6f88aa8dd65743ff27d186087e6856..9d22da1dd9039ca2414ad23f907ea6474b57801a 100644 (file)
@@ -506,6 +506,13 @@ namespace llvm {
                         bool IsZeroVal, bool MemcpyStrSrc,
                         MachineFunction &MF) const;
 
+    /// 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;
+
     /// allowsUnalignedMemoryAccesses - Returns true if the target allows
     /// unaligned memory accesses. of the specified type. Returns whether it
     /// is "fast" by reference in the second argument.