• Home
  • Raw
  • Download

Lines Matching full:constants

242   std::vector<const analysis::Constant*> constants =  in FoldInstructionInternal()  local
247 if (rule(context_, inst, constants)) { in FoldInstructionInternal()
256 // result in 32 bit word. Scalar constants with longer than 32-bit width are
268 "Scalar constants with longer than 32-bit width are not allowed " in FoldScalars()
289 const analysis::IntConstant* constants[2]; in FoldBinaryIntegerOpToConstant() local
298 constants[i] = (constant != nullptr ? constant->AsIntConstant() : nullptr); in FoldBinaryIntegerOpToConstant()
305 if (constants[i] != nullptr && constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
318 if (constants[i] != nullptr && constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
328 if (constants[1] != nullptr) { in FoldBinaryIntegerOpToConstant()
333 uint32_t shift_amount = constants[1]->GetU32BitValue(); in FoldBinaryIntegerOpToConstant()
344 if (constants[i] != nullptr) { in FoldBinaryIntegerOpToConstant()
348 uint32_t mask = constants[i]->GetU32BitValue(); in FoldBinaryIntegerOpToConstant()
358 if (constants[i] != nullptr) { in FoldBinaryIntegerOpToConstant()
359 if (constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
369 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
370 constants[0]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
374 if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { in FoldBinaryIntegerOpToConstant()
380 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
381 constants[0]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
385 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
386 constants[1]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
392 if (constants[0] != nullptr && constants[0]->IsZero()) { in FoldBinaryIntegerOpToConstant()
396 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
397 constants[1]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
403 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
404 constants[0]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
408 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
409 constants[1]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
415 if (constants[0] != nullptr && constants[0]->IsZero()) { in FoldBinaryIntegerOpToConstant()
419 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
420 constants[1]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
426 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
427 constants[0]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
431 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
432 constants[1]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
438 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
439 constants[0]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
443 if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { in FoldBinaryIntegerOpToConstant()
449 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
450 constants[0]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
454 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
455 constants[1]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
473 const analysis::BoolConstant* constants[2]; in FoldBinaryBooleanOpToConstant() local
482 constants[i] = (constant != nullptr ? constant->AsBoolConstant() : nullptr); in FoldBinaryBooleanOpToConstant()
489 if (constants[i] != nullptr) { in FoldBinaryBooleanOpToConstant()
490 if (constants[i]->value()) { in FoldBinaryBooleanOpToConstant()
499 if (constants[i] != nullptr) { in FoldBinaryBooleanOpToConstant()
500 if (!constants[i]->value()) { in FoldBinaryBooleanOpToConstant()
539 // Extract the raw value of the scalar component constants in FoldVectors()
541 // is that we do not create temporary null constants as components in FoldVectors()
619 // Currently supported constants are 32-bit values or null constants. in IsFoldableConstant()
635 std::vector<const analysis::Constant*> constants; in FoldInstructionToConstant() local
637 inst->ForEachInId([&constants, &missing_constants, const_mgr, in FoldInstructionToConstant()
642 constants.push_back(nullptr); in FoldInstructionToConstant()
645 constants.push_back(const_op); in FoldInstructionToConstant()
651 folded_const = rule(context_, inst, constants); in FoldInstructionToConstant()
669 result_val = FoldScalars(inst->opcode(), constants); in FoldInstructionToConstant()