1 //===-- SystemZSelectionDAGInfo.cpp - SystemZ SelectionDAG Info -----------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the SystemZSelectionDAGInfo class.
12 //===----------------------------------------------------------------------===//
14 #define DEBUG_TYPE "systemz-selectiondag-info"
15 #include "SystemZTargetMachine.h"
16 #include "llvm/CodeGen/SelectionDAG.h"
20 SystemZSelectionDAGInfo::
21 SystemZSelectionDAGInfo(const SystemZTargetMachine &TM)
22 : TargetSelectionDAGInfo(TM) {
25 SystemZSelectionDAGInfo::~SystemZSelectionDAGInfo() {
28 SDValue SystemZSelectionDAGInfo::
29 EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
30 SDValue Dst, SDValue Src, SDValue Size, unsigned Align,
31 bool IsVolatile, bool AlwaysInline,
32 MachinePointerInfo DstPtrInfo,
33 MachinePointerInfo SrcPtrInfo) const {
37 if (ConstantSDNode *CSize = dyn_cast<ConstantSDNode>(Size)) {
38 uint64_t Bytes = CSize->getZExtValue();
39 if (Bytes >= 1 && Bytes <= 0x100) {
41 return DAG.getNode(SystemZISD::MVC, DL, MVT::Other,
42 Chain, Dst, Src, Size);