[llvm-commits] [llvm] r59847 - in /llvm/trunk/lib/CodeGen/SelectionDAG: DAGCombiner.cpp LegalizeDAG.cpp LegalizeIntegerTypes.cpp LegalizeTypes.h

Duncan Sands baldrick at free.fr
Fri Nov 21 18:53:13 PST 2008


Hi Bill,

> +SDValue DAGTypeLegalizer::PromoteIntRes_XADDO(SDNode *N, unsigned ResNo,
> +                                              ISD::NodeType NTy) {
> +  MVT NewVT = TLI.getTypeToTransformTo(SDValue(N, ResNo).getValueType());
> +  assert(isTypeLegal(NewVT) && "Illegal XADDO type!");
> +
> +  MVT ValueVTs[] = { N->getOperand(0).getValueType(), NewVT };
> +  SDValue Ops[] = { N->getOperand(0), N->getOperand(1) };
> +
> +  SDValue Res = DAG.getNode(NTy, DAG.getVTList(&ValueVTs[0], 2), &Ops[0], 2);
> +  ReplaceValueWith(SDValue(N, 0), SDValue(Res.getNode(), 0));
> +  ReplaceValueWith(SDValue(N, 1), SDValue(Res.getNode(), 1));
> +  return Res;
> +}

I'm not sure what you are trying to do here :)  Is this for promoting the
i1 result?

Thanks,

Duncan.



More information about the llvm-commits mailing list