Deleted Added
full compact
AArch64ISelLowering.cpp (280865) AArch64ISelLowering.cpp (283526)
1//===-- AArch64ISelLowering.cpp - AArch64 DAG Lowering Implementation ----===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 2017 unchanged lines hidden (view full) ---

2026 // Since AnalyzeFormalArguments uses Ins[].VT for both ValVT and LocVT, here
2027 // we use a special version of AnalyzeFormalArguments to pass in ValVT and
2028 // LocVT.
2029 unsigned NumArgs = Ins.size();
2030 Function::const_arg_iterator CurOrigArg = MF.getFunction()->arg_begin();
2031 unsigned CurArgIdx = 0;
2032 for (unsigned i = 0; i != NumArgs; ++i) {
2033 MVT ValVT = Ins[i].VT;
1//===-- AArch64ISelLowering.cpp - AArch64 DAG Lowering Implementation ----===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 2017 unchanged lines hidden (view full) ---

2026 // Since AnalyzeFormalArguments uses Ins[].VT for both ValVT and LocVT, here
2027 // we use a special version of AnalyzeFormalArguments to pass in ValVT and
2028 // LocVT.
2029 unsigned NumArgs = Ins.size();
2030 Function::const_arg_iterator CurOrigArg = MF.getFunction()->arg_begin();
2031 unsigned CurArgIdx = 0;
2032 for (unsigned i = 0; i != NumArgs; ++i) {
2033 MVT ValVT = Ins[i].VT;
2034 std::advance(CurOrigArg, Ins[i].OrigArgIndex - CurArgIdx);
2035 CurArgIdx = Ins[i].OrigArgIndex;
2034 if (Ins[i].isOrigArg()) {
2035 std::advance(CurOrigArg, Ins[i].getOrigArgIndex() - CurArgIdx);
2036 CurArgIdx = Ins[i].getOrigArgIndex();
2036
2037
2037 // Get type of the original argument.
2038 EVT ActualVT = getValueType(CurOrigArg->getType(), /*AllowUnknown*/ true);
2039 MVT ActualMVT = ActualVT.isSimple() ? ActualVT.getSimpleVT() : MVT::Other;
2040 // If ActualMVT is i1/i8/i16, we should set LocVT to i8/i8/i16.
2041 if (ActualMVT == MVT::i1 || ActualMVT == MVT::i8)
2042 ValVT = MVT::i8;
2043 else if (ActualMVT == MVT::i16)
2044 ValVT = MVT::i16;
2045
2038 // Get type of the original argument.
2039 EVT ActualVT = getValueType(CurOrigArg->getType(), /*AllowUnknown*/ true);
2040 MVT ActualMVT = ActualVT.isSimple() ? ActualVT.getSimpleVT() : MVT::Other;
2041 // If ActualMVT is i1/i8/i16, we should set LocVT to i8/i8/i16.
2042 if (ActualMVT == MVT::i1 || ActualMVT == MVT::i8)
2043 ValVT = MVT::i8;
2044 else if (ActualMVT == MVT::i16)
2045 ValVT = MVT::i16;
2046 }
2046 CCAssignFn *AssignFn = CCAssignFnForCall(CallConv, /*IsVarArg=*/false);
2047 bool Res =
2048 AssignFn(i, ValVT, ValVT, CCValAssign::Full, Ins[i].Flags, CCInfo);
2049 assert(!Res && "Call operand has unhandled type");
2050 (void)Res;
2051 }
2052 assert(ArgLocs.size() == Ins.size());
2053 SmallVector<SDValue, 16> ArgValues;

--- 6788 unchanged lines hidden ---
2047 CCAssignFn *AssignFn = CCAssignFnForCall(CallConv, /*IsVarArg=*/false);
2048 bool Res =
2049 AssignFn(i, ValVT, ValVT, CCValAssign::Full, Ins[i].Flags, CCInfo);
2050 assert(!Res && "Call operand has unhandled type");
2051 (void)Res;
2052 }
2053 assert(ArgLocs.size() == Ins.size());
2054 SmallVector<SDValue, 16> ArgValues;

--- 6788 unchanged lines hidden ---