Fix expansion of vsetcc to set the high bit for true instead of 1.

llvm-svn: 61129
This commit is contained in:
Mon P Wang 2008-12-17 08:49:47 +00:00
parent 3d72297909
commit 015a7f57b2
1 changed files with 6 additions and 4 deletions

View File

@ -3144,10 +3144,12 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
SDValue In1 = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, TmpEltVT,
Tmp1, DAG.getIntPtrConstant(i));
Ops[i] = DAG.getNode(ISD::SETCC, TLI.getSetCCResultType(In1), In1,
DAG.getNode(ISD::EXTRACT_VECTOR_ELT, TmpEltVT,
Tmp2, DAG.getIntPtrConstant(i)),
CC);
Ops[i] = DAG.getNode(ISD::SIGN_EXTEND, EltVT, Ops[i]);
DAG.getNode(ISD::EXTRACT_VECTOR_ELT, TmpEltVT,
Tmp2, DAG.getIntPtrConstant(i)),
CC);
Ops[i] = DAG.getNode(ISD::SELECT, EltVT, Ops[i],
DAG.getConstant(EltVT.getIntegerVTBitMask(),EltVT),
DAG.getConstant(0, EltVT));
}
Result = DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], NumElems);
break;