• Home
  • Raw
  • Download

Lines Matching full:constants

190   std::vector<const analysis::Constant*> constants =  in FoldInstructionInternal()  local
195 if (rule(context_, inst, constants)) { in FoldInstructionInternal()
204 // result in 32 bit word. Scalar constants with longer than 32-bit width are
216 "Scalar constants with longer than 32-bit width are not allowed " in FoldScalars()
237 const analysis::IntConstant* constants[2]; in FoldBinaryIntegerOpToConstant() local
246 constants[i] = (constant != nullptr ? constant->AsIntConstant() : nullptr); in FoldBinaryIntegerOpToConstant()
253 if (constants[i] != nullptr && constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
266 if (constants[i] != nullptr && constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
276 if (constants[1] != nullptr) { in FoldBinaryIntegerOpToConstant()
281 uint32_t shift_amount = constants[1]->GetU32BitValue(); in FoldBinaryIntegerOpToConstant()
292 if (constants[i] != nullptr) { in FoldBinaryIntegerOpToConstant()
296 uint32_t mask = constants[i]->GetU32BitValue(); in FoldBinaryIntegerOpToConstant()
306 if (constants[i] != nullptr) { in FoldBinaryIntegerOpToConstant()
307 if (constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
317 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
318 constants[0]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
322 if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { in FoldBinaryIntegerOpToConstant()
328 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
329 constants[0]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
333 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
334 constants[1]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
340 if (constants[0] != nullptr && constants[0]->IsZero()) { in FoldBinaryIntegerOpToConstant()
344 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
345 constants[1]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
351 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
352 constants[0]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
356 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
357 constants[1]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
363 if (constants[0] != nullptr && constants[0]->IsZero()) { in FoldBinaryIntegerOpToConstant()
367 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
368 constants[1]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
374 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
375 constants[0]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
379 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
380 constants[1]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
386 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
387 constants[0]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
391 if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { in FoldBinaryIntegerOpToConstant()
397 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
398 constants[0]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
402 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
403 constants[1]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
421 const analysis::BoolConstant* constants[2]; in FoldBinaryBooleanOpToConstant() local
430 constants[i] = (constant != nullptr ? constant->AsBoolConstant() : nullptr); in FoldBinaryBooleanOpToConstant()
437 if (constants[i] != nullptr) { in FoldBinaryBooleanOpToConstant()
438 if (constants[i]->value()) { in FoldBinaryBooleanOpToConstant()
447 if (constants[i] != nullptr) { in FoldBinaryBooleanOpToConstant()
448 if (!constants[i]->value()) { in FoldBinaryBooleanOpToConstant()
487 // Extract the raw value of the scalar component constants in FoldVectors()
489 // is that we do not create temporary null constants as components in FoldVectors()
567 // Currently supported constants are 32-bit values or null constants. in IsFoldableConstant()
583 std::vector<const analysis::Constant*> constants; in FoldInstructionToConstant() local
585 inst->ForEachInId([&constants, &missing_constants, const_mgr, in FoldInstructionToConstant()
590 constants.push_back(nullptr); in FoldInstructionToConstant()
593 constants.push_back(const_op); in FoldInstructionToConstant()
599 folded_const = rule(context_, inst, constants); in FoldInstructionToConstant()
620 result_val = FoldScalars(inst->opcode(), constants); in FoldInstructionToConstant()
642 inst->opcode(), inst_type->GetSingleWordInOperand(1), constants); in FoldInstructionToConstant()