Lines Matching refs:constants
240 std::vector<const analysis::Constant*> constants = in FoldInstructionInternal() local
244 if (rule(context_, inst, constants)) { in FoldInstructionInternal()
286 const analysis::IntConstant* constants[2]; in FoldBinaryIntegerOpToConstant() local
295 constants[i] = (constant != nullptr ? constant->AsIntConstant() : nullptr); in FoldBinaryIntegerOpToConstant()
302 if (constants[i] != nullptr && constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
315 if (constants[i] != nullptr && constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
325 if (constants[1] != nullptr) { in FoldBinaryIntegerOpToConstant()
330 uint32_t shift_amount = constants[1]->GetU32BitValue(); in FoldBinaryIntegerOpToConstant()
341 if (constants[i] != nullptr) { in FoldBinaryIntegerOpToConstant()
345 uint32_t mask = constants[i]->GetU32BitValue(); in FoldBinaryIntegerOpToConstant()
355 if (constants[i] != nullptr) { in FoldBinaryIntegerOpToConstant()
356 if (constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
366 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
367 constants[0]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
371 if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { in FoldBinaryIntegerOpToConstant()
377 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
378 constants[0]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
382 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
383 constants[1]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
389 if (constants[0] != nullptr && constants[0]->IsZero()) { in FoldBinaryIntegerOpToConstant()
393 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
394 constants[1]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
400 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
401 constants[0]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
405 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
406 constants[1]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
412 if (constants[0] != nullptr && constants[0]->IsZero()) { in FoldBinaryIntegerOpToConstant()
416 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
417 constants[1]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
423 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
424 constants[0]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
428 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
429 constants[1]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
435 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
436 constants[0]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
440 if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { in FoldBinaryIntegerOpToConstant()
446 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
447 constants[0]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
451 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
452 constants[1]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
470 const analysis::BoolConstant* constants[2]; in FoldBinaryBooleanOpToConstant() local
479 constants[i] = (constant != nullptr ? constant->AsBoolConstant() : nullptr); in FoldBinaryBooleanOpToConstant()
486 if (constants[i] != nullptr) { in FoldBinaryBooleanOpToConstant()
487 if (constants[i]->value()) { in FoldBinaryBooleanOpToConstant()
496 if (constants[i] != nullptr) { in FoldBinaryBooleanOpToConstant()
497 if (!constants[i]->value()) { in FoldBinaryBooleanOpToConstant()
630 std::vector<const analysis::Constant*> constants; in FoldInstructionToConstant() local
632 inst->ForEachInId([&constants, &missing_constants, const_mgr, in FoldInstructionToConstant()
637 constants.push_back(nullptr); in FoldInstructionToConstant()
640 constants.push_back(const_op); in FoldInstructionToConstant()
648 folded_const = rule(context_, inst, constants); in FoldInstructionToConstant()
664 result_val = FoldScalars(inst->opcode(), constants); in FoldInstructionToConstant()