fix unused variable warnings in conditionals

for 92023b1509
This commit is contained in:
Mikhail Goncharov 2023-08-30 14:36:42 +02:00
parent 04b1276ad3
commit 74f4daef04
2 changed files with 3 additions and 2 deletions

View File

@ -1424,7 +1424,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
// If this is a simple instruction that we can value number, process it.
if (SimpleValue::canHandle(&Inst)) {
if (auto *CI = dyn_cast<ConstrainedFPIntrinsic>(&Inst)) {
if ([[maybe_unused]] auto *CI = dyn_cast<ConstrainedFPIntrinsic>(&Inst)) {
assert(CI->getExceptionBehavior() != fp::ebStrict &&
"Unexpected ebStrict from SimpleValue::canHandle()");
assert((!CI->getRoundingMode() ||

View File

@ -730,7 +730,8 @@ bool ScalarizerVisitor::splitCall(CallInst &CI) {
// vector type, which is true for all current intrinsics.
for (unsigned I = 0; I != NumArgs; ++I) {
Value *OpI = CI.getOperand(I);
if (auto *OpVecTy = dyn_cast<FixedVectorType>(OpI->getType())) {
if ([[maybe_unused]] auto *OpVecTy =
dyn_cast<FixedVectorType>(OpI->getType())) {
assert(OpVecTy->getNumElements() == VS->VecTy->getNumElements());
std::optional<VectorSplit> OpVS = getVectorSplit(OpI->getType());
if (!OpVS || OpVS->NumPacked != VS->NumPacked) {