1 //===-- HexagonSelectionDAGInfo.cpp - Hexagon 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 HexagonSelectionDAGInfo class.
12 //===----------------------------------------------------------------------===//
14 #define DEBUG_TYPE "hexagon-selectiondag-info"
15 #include "HexagonTargetMachine.h"
18 bool llvm::flag_aligned_memcpy
;
20 HexagonSelectionDAGInfo::HexagonSelectionDAGInfo(const HexagonTargetMachine
22 : TargetSelectionDAGInfo(TM
) {
25 HexagonSelectionDAGInfo::~HexagonSelectionDAGInfo() {
29 HexagonSelectionDAGInfo::
30 EmitTargetCodeForMemcpy(SelectionDAG
&DAG
, DebugLoc dl
, SDValue Chain
,
31 SDValue Dst
, SDValue Src
, SDValue Size
, unsigned Align
,
32 bool isVolatile
, bool AlwaysInline
,
33 MachinePointerInfo DstPtrInfo
,
34 MachinePointerInfo SrcPtrInfo
) const {
35 flag_aligned_memcpy
= false;
36 if ((Align
& 0x3) == 0) {
37 ConstantSDNode
*ConstantSize
= dyn_cast
<ConstantSDNode
>(Size
);
39 uint64_t SizeVal
= ConstantSize
->getZExtValue();
40 if ((SizeVal
> 32) && ((SizeVal
% 8) == 0))
41 flag_aligned_memcpy
= true;