summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-04 22:22:37 +0000
committerChris Lattner <sabre@nondot.org>2007-01-04 22:22:37 +0000
commit96035bed513981eb9b9587e473ce80e8e75276b2 (patch)
tree05bc623a3df10dd7fc2ace0141e9297fc38e2c20
parent447a9dd56e85ab09366f163f2e02bbd14241ee13 (diff)
downloadbcm5719-llvm-96035bed513981eb9b9587e473ce80e8e75276b2.tar.gz
bcm5719-llvm-96035bed513981eb9b9587e473ce80e8e75276b2.zip
fix PowerPC/2007-01-04-ArgExtension.ll, a bug handling K&R prototypes with
the recent signless changes. llvm-svn: 32884
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index ce0038d6b87..f4fe873f9fb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/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?");
OpenPOWER on IntegriCloud