diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1419,7 +1419,7 @@ // Emit a store of each element to the stack slot. SmallVector Stores; - unsigned TypeByteSize = MemVT.getSizeInBits() / 8; + TypeSize TypeByteSize = MemVT.getSizeInBits() / 8; assert(TypeByteSize > 0 && "Vector element type too small for stack store!"); // If the destination vector element type of a BUILD_VECTOR is narrower than @@ -1432,9 +1432,9 @@ // Ignore undef elements. if (Node->getOperand(i).isUndef()) continue; - unsigned Offset = TypeByteSize*i; + TypeSize Offset = TypeByteSize * i; - SDValue Idx = DAG.getMemBasePlusOffset(FIPtr, TypeSize::Fixed(Offset), dl); + SDValue Idx = DAG.getMemBasePlusOffset(FIPtr, Offset, dl); if (Truncate) Stores.push_back(DAG.getTruncStore(DAG.getEntryNode(), dl,