NVPTX: Fold otherwise unused variable into assert.

Avoids unused variable warnings in release builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2013-06-29 22:51:12 +00:00
parent edac9151fd
commit bebf6222f6

View File

@ -657,7 +657,6 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
const DataLayout *TD = getDataLayout();
MachineFunction &MF = DAG.getMachineFunction();
const Function *F = MF.getFunction();
const TargetLowering *TLI = nvTM->getTargetLowering();
SDValue tempChain = Chain;
Chain =
@ -1076,7 +1075,8 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
EVT ObjectVT = getValueType(retTy);
unsigned NumElts = ObjectVT.getVectorNumElements();
EVT EltVT = ObjectVT.getVectorElementType();
assert(TLI->getNumRegisters(F->getContext(), ObjectVT) == NumElts &&
assert(nvTM->getTargetLowering()->getNumRegisters(F->getContext(),
ObjectVT) == NumElts &&
"Vector was not scalarized");
unsigned sz = EltVT.getSizeInBits();
bool needTruncate = sz < 16 ? true : false;