mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
[FastISel][ARM] Do not emit stores for undef arguments.
This is a followup patch for r214366, which added the same behavior to the AArch64 and X86 FastISel code. This fix reproduces the already existing behavior of SelectionDAG in FastISel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214531 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1941,6 +1941,7 @@ bool ARMFastISel::ProcessCallArgs(SmallVectorImpl<Value*> &Args,
|
||||
// Process the args.
|
||||
for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
|
||||
CCValAssign &VA = ArgLocs[i];
|
||||
const Value *ArgVal = Args[VA.getValNo()];
|
||||
unsigned Arg = ArgRegs[VA.getValNo()];
|
||||
MVT ArgVT = ArgVTs[VA.getValNo()];
|
||||
|
||||
@@ -2001,6 +2002,11 @@ bool ARMFastISel::ProcessCallArgs(SmallVectorImpl<Value*> &Args,
|
||||
} else {
|
||||
assert(VA.isMemLoc());
|
||||
// Need to store on the stack.
|
||||
|
||||
// Don't emit stores for undef values.
|
||||
if (isa<UndefValue>(ArgVal))
|
||||
continue;
|
||||
|
||||
Address Addr;
|
||||
Addr.BaseType = Address::RegBase;
|
||||
Addr.Base.Reg = ARM::SP;
|
||||
|
Reference in New Issue
Block a user