]> granicus.if.org Git - llvm/commitdiff
Support MemoryLocation::UnknownSize in TargetLowering::IntrinsicInfo
authorTamas Berghammer <tberghammer@google.com>
Mon, 30 Sep 2019 14:44:24 +0000 (14:44 +0000)
committerTamas Berghammer <tberghammer@google.com>
Mon, 30 Sep 2019 14:44:24 +0000 (14:44 +0000)
Summary:
Previously IntrinsicInfo::size was an unsigned what can't represent the
64 bit value used by MemoryLocation::UnknownSize.

Reviewers: jmolloy

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373214 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 1c35c9f65a00b8ddc8da50c127506d02cc4fbff5..be6e2bd7d65260293d7790e8704c50d5d6f5a39b 100644 (file)
@@ -1041,7 +1041,7 @@ public:
     unsigned Align = 0,
     MachineMemOperand::Flags Flags
     = MachineMemOperand::MOLoad | MachineMemOperand::MOStore,
-    unsigned Size = 0,
+    uint64_t Size = 0,
     const AAMDNodes &AAInfo = AAMDNodes());
 
   SDValue getMemIntrinsicNode(unsigned Opcode, const SDLoc &dl, SDVTList VTList,
index f325707fd0ae281f430d14cb99dbcc4f42ccfd00..0e9c19a2597a494f2e0ef1a4e9da0616ea240198 100644 (file)
@@ -836,7 +836,7 @@ public:
     PointerUnion<const Value *, const PseudoSourceValue *> ptrVal;
 
     int          offset = 0;       // offset off of ptrVal
-    unsigned     size = 0;         // the size of the memory location
+    uint64_t     size = 0;         // the size of the memory location
                                    // (taken from memVT if zero)
     MaybeAlign align = Align::None(); // alignment
 
index 1b313de5ccd7d1a0b0b28701350a2ab36f2ff20d..0c55ff73c3b740e9f81fbf39997a2ebfa4ba6753 100644 (file)
@@ -6553,7 +6553,7 @@ SDValue SelectionDAG::getMergeValues(ArrayRef<SDValue> Ops, const SDLoc &dl) {
 SDValue SelectionDAG::getMemIntrinsicNode(
     unsigned Opcode, const SDLoc &dl, SDVTList VTList, ArrayRef<SDValue> Ops,
     EVT MemVT, MachinePointerInfo PtrInfo, unsigned Align,
-    MachineMemOperand::Flags Flags, unsigned Size, const AAMDNodes &AAInfo) {
+    MachineMemOperand::Flags Flags, uint64_t Size, const AAMDNodes &AAInfo) {
   if (Align == 0)  // Ensure that codegen never sees alignment 0
     Align = getEVTAlignment(MemVT);