diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-04 22:22:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-04 22:22:37 +0000 |
commit | f8e7a219121b7d6f8bcf1e22828648a243384fbb (patch) | |
tree | 39e774fd18d1e2e43e03d57550bfa8aafe5820c8 | |
parent | e0170dfd2ad270e502e28ab284de86ce2c38f4a4 (diff) |
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
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ce0038d6b8..f4fe873f9f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -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?"); |