fix sext breakage: now we correctly deal with functions that return
authorDuraid Madina <duraid@octopus.com.au>
Fri, 20 Jan 2006 16:10:05 +0000 (16:10 +0000)
committerDuraid Madina <duraid@octopus.com.au>
Fri, 20 Jan 2006 16:10:05 +0000 (16:10 +0000)
int vs uint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25478 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/IA64/IA64ISelDAGToDAG.cpp
lib/Target/IA64/IA64ISelLowering.cpp

index 18637c26eaeaeee12e0f3a4c8f604c9da484694e..5c5802eb6544690de626f709de47a1695c62bca4 100644 (file)
@@ -494,7 +494,7 @@ SDOperand IA64DAGToDAGISel::Select(SDOperand Op) {
 */
 
   case ISD::LOAD:
-  case ISD::EXTLOAD:
+  case ISD::EXTLOAD: // FIXME: load -1, not 1, for bools?
   case ISD::ZEXTLOAD: {
     SDOperand Chain = Select(N->getOperand(0));
     SDOperand Address = Select(N->getOperand(1));
index c4a4cdf94353bf02c7d228666ac6cefdb9e78c5d..7e46fdf7062edfe7324d86ba1324cdccd05c72c0 100644 (file)
@@ -475,6 +475,8 @@ IA64TargetLowering::LowerCallTo(SDOperand Chain,
     switch (RetTyVT) {
     default: assert(0 && "Unknown value type to return!");
     case MVT::i1: { // bools are just like other integers (returned in r8)
+      // we *could* fall through to the truncate below, but this saves a
+      // few redundant predicate ops
       SDOperand boolInR8 = DAG.getCopyFromReg(Chain, IA64::r8, MVT::i64, InFlag);
       InFlag = boolInR8.getValue(2);
       Chain = boolInR8.getValue(1);
@@ -492,8 +494,10 @@ IA64TargetLowering::LowerCallTo(SDOperand Chain,
       Chain = RetVal.getValue(1);
       
       // keep track of whether it is sign or zero extended (todo: bools?)
+/* XXX
       RetVal = DAG.getNode(RetTy->isSigned() ? ISD::AssertSext :ISD::AssertZext,
                            MVT::i64, RetVal, DAG.getValueType(RetTyVT));
+*/
       RetVal = DAG.getNode(ISD::TRUNCATE, RetTyVT, RetVal);
       break;
     case MVT::i64: