mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-28 23:43:50 +00:00
Make sure we return the right sized type here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85436 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a597103c32
commit
7e5d2ff20f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user