diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h --- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h @@ -598,8 +598,9 @@ // TODO: unfriend HandleSDNode once we fix its operand handling. friend class HandleSDNode; - /// Unique id per SDNode in the DAG. - int NodeId = -1; + /// The number of entries in the Operand/Value list. + unsigned NumOperands = 0; + unsigned NumValues; /// The values that are used by this operation. SDUse *OperandList = nullptr; @@ -611,9 +612,8 @@ /// List of uses for this SDNode. SDUse *UseList = nullptr; - /// The number of entries in the Operand/Value list. - unsigned short NumOperands = 0; - unsigned short NumValues; + /// Unique id per SDNode in the DAG. + int NodeId = -1; // The ordering of the SDNodes. It roughly corresponds to the ordering of the // original LLVM instructions. @@ -1082,7 +1082,7 @@ /// SDNodes are created without any operands, and never own the operand /// storage. To add operands, see SelectionDAG::createOperands. SDNode(unsigned Opc, unsigned Order, DebugLoc dl, SDVTList VTs) - : NodeType(Opc), ValueList(VTs.VTs), NumValues(VTs.NumVTs), + : NodeType(Opc), NumValues(VTs.NumVTs), ValueList(VTs.VTs), IROrder(Order), debugLoc(std::move(dl)) { memset(&RawSDNodeBits, 0, sizeof(RawSDNodeBits)); assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor"); diff --git a/llvm/test/CodeGen/Generic/large-array-load.ll b/llvm/test/CodeGen/Generic/large-array-load.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/Generic/large-array-load.ll @@ -0,0 +1,8 @@ +; RUN: llc < %s + +@arr_32 = external global [70000 x i32] + +define void @load() { + %i11 = load [70000 x i32], ptr @arr_32, align 4 + ret void +} \ No newline at end of file