From ddf53e45b29087c57e0c864c93f86d5e99182d55 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 26 Feb 2007 02:56:58 +0000 Subject: [PATCH] track signedness of formal argument, though we have a fixme here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34620 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 69aa6aedf86..3842db5d9d0 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3111,8 +3111,16 @@ TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) { // Flags[31:27] -> OriginalAlignment // Flags[2] -> isSRet // Flags[1] -> isInReg + // Flags[0] -> isSigned unsigned Flags = (isInReg << 1) | (isSRet << 2) | (OriginalAlignment << 27); + // FIXME: Distinguish between a formal with no [sz]ext attribute from one + // that is zero extended! + if (FTy->paramHasAttr(j, FunctionType::ZExtAttribute)) + Flags |= 0; + if (FTy->paramHasAttr(j, FunctionType::SExtAttribute)) + Flags |= 1; + switch (getTypeAction(VT)) { default: assert(0 && "Unknown type action!"); case Legal: