Skip to content

Commit 9bcb928

Browse files
Fixed a couple of nits and a comment that I forgot to update.
1 parent 492bd26 commit 9bcb928

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7295,22 +7295,20 @@ SDValue PPCTargetLowering::LowerFormalArguments_AIX(
72957295
SDValue ArgValue =
72967296
DAG.getLoad(ValVT, dl, Chain, FIN, MachinePointerInfo());
72977297

7298-
// While the ABI specifies the the higher bits of the load should be
7299-
// zeroed out this is not always the case. For safety this code will zero
7300-
// extend the loaded value if the size of the argument type is smaller
7301-
// then the load.
7298+
// While the ABI specifies that the higher bits of the load should be
7299+
// zeroed out or sign extended this is not always the case. For safety
7300+
// this code will zero or sign extend the loaded value if the size of
7301+
// the argument type is smaller than the load.
73027302
if (!ArgVT.isVector() && !ValVT.isVector() && ArgVT.isInteger() &&
73037303
ValVT.isInteger() &&
73047304
ArgVT.getScalarSizeInBits() < ValVT.getScalarSizeInBits()) {
73057305
SDValue ArgValueTrunc = DAG.getNode(ISD::TRUNCATE, dl, ArgVT, ArgValue);
7306-
// DAG.getLoad(ArgVT, dl, Chain, FIN, MachinePointerInfo());
73077306
SDValue ArgValueExt =
73087307
ArgSignExt ? DAG.getSExtOrTrunc(ArgValueTrunc, dl, ValVT)
73097308
: DAG.getZExtOrTrunc(ArgValueTrunc, dl, ValVT);
73107309
InVals.push_back(ArgValueExt);
7311-
} else {
7310+
} else
73127311
InVals.push_back(ArgValue);
7313-
}
73147312
};
73157313

73167314
// Vector arguments to VaArg functions are passed both on the stack, and

0 commit comments

Comments
 (0)