mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
fix PowerPC/2007-01-04-ArgExtension.ll, a bug handling K&R prototypes with
the recent signless changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e0170dfd2a
commit
f8e7a21912
@ -2955,10 +2955,12 @@ TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
|
||||
case Promote: {
|
||||
SDOperand Op(Result, i++);
|
||||
if (MVT::isInteger(VT)) {
|
||||
unsigned AssertOp = ISD::AssertSext;
|
||||
if (FTy->paramHasAttr(Idx, FunctionType::ZExtAttribute))
|
||||
AssertOp = ISD::AssertZext;
|
||||
Op = DAG.getNode(AssertOp, Op.getValueType(), Op, DAG.getValueType(VT));
|
||||
if (FTy->paramHasAttr(Idx, FunctionType::SExtAttribute))
|
||||
Op = DAG.getNode(ISD::AssertSext, Op.getValueType(), Op,
|
||||
DAG.getValueType(VT));
|
||||
else if (FTy->paramHasAttr(Idx, FunctionType::ZExtAttribute))
|
||||
Op = DAG.getNode(ISD::AssertZext, Op.getValueType(), Op,
|
||||
DAG.getValueType(VT));
|
||||
Op = DAG.getNode(ISD::TRUNCATE, VT, Op);
|
||||
} else {
|
||||
assert(MVT::isFloatingPoint(VT) && "Not int or FP?");
|
||||
|
Loading…
Reference in New Issue
Block a user