mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 08:57:43 +08:00
Move the piece of code up that skips the padding argument. Without this change,
padding insertion will not work if the coerced type is not a structure. llvm-svn: 147786
This commit is contained in:
@@ -988,6 +988,10 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
|
||||
|
||||
case ABIArgInfo::Extend:
|
||||
case ABIArgInfo::Direct: {
|
||||
// Skip the dummy padding argument.
|
||||
if (ArgI.getPaddingType())
|
||||
++AI;
|
||||
|
||||
// If we have the trivial case, handle it with no muss and fuss.
|
||||
if (!isa<llvm::StructType>(ArgI.getCoerceToType()) &&
|
||||
ArgI.getCoerceToType() == ConvertType(Ty) &&
|
||||
@@ -1030,10 +1034,6 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
|
||||
llvm::PointerType::getUnqual(ArgI.getCoerceToType()));
|
||||
}
|
||||
|
||||
// Skip the dummy padding argument.
|
||||
if (ArgI.getPaddingType())
|
||||
++AI;
|
||||
|
||||
// If the coerce-to type is a first class aggregate, we flatten it and
|
||||
// pass the elements. Either way is semantically identical, but fast-isel
|
||||
// and the optimizer generally likes scalar values better than FCAs.
|
||||
|
||||
Reference in New Issue
Block a user