Make sure we return the right sized type here.

llvm-svn: 85436
This commit is contained in:
Eric Christopher 2009-10-28 21:32:16 +00:00
parent 5179f308a2
commit 1fd4c577d2
1 changed files with 5 additions and 2 deletions

View File

@ -4220,10 +4220,13 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
assert(CI && "Non-constant type in __builtin_object_size?");
SDValue Arg = getValue(I.getOperand(0));
EVT Ty = Arg.getValueType();
if (CI->getZExtValue() < 2)
setValue(&I, DAG.getConstant(-1, MVT::i32));
setValue(&I, DAG.getConstant(-1, Ty));
else
setValue(&I, DAG.getConstant(0, MVT::i32));
setValue(&I, DAG.getConstant(0, Ty));
return 0;
}
case Intrinsic::var_annotation: