Lines Matching full:constants
222 std::vector<const analysis::Constant*> constants = in FoldInstructionInternal() local
226 if (rule(context_, inst, constants)) { in FoldInstructionInternal()
235 // result in 32 bit word. Scalar constants with longer than 32-bit width are
247 "Scalar constants with longer than 32-bit width are not allowed " in FoldScalars()
268 const analysis::IntConstant* constants[2]; in FoldBinaryIntegerOpToConstant() local
277 constants[i] = (constant != nullptr ? constant->AsIntConstant() : nullptr); in FoldBinaryIntegerOpToConstant()
284 if (constants[i] != nullptr && constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
297 if (constants[i] != nullptr && constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
307 if (constants[1] != nullptr) { in FoldBinaryIntegerOpToConstant()
311 uint32_t shift_amount = constants[1]->GetU32BitValue(); in FoldBinaryIntegerOpToConstant()
322 if (constants[i] != nullptr) { in FoldBinaryIntegerOpToConstant()
326 uint32_t mask = constants[i]->GetU32BitValue(); in FoldBinaryIntegerOpToConstant()
336 if (constants[i] != nullptr) { in FoldBinaryIntegerOpToConstant()
337 if (constants[i]->IsZero()) { in FoldBinaryIntegerOpToConstant()
347 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
348 constants[0]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
352 if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { in FoldBinaryIntegerOpToConstant()
358 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
359 constants[0]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
363 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
364 constants[1]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
370 if (constants[0] != nullptr && constants[0]->IsZero()) { in FoldBinaryIntegerOpToConstant()
374 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
375 constants[1]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
381 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
382 constants[0]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
386 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
387 constants[1]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
393 if (constants[0] != nullptr && constants[0]->IsZero()) { in FoldBinaryIntegerOpToConstant()
397 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
398 constants[1]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
404 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
405 constants[0]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
409 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
410 constants[1]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
416 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
417 constants[0]->GetU32BitValue() == UINT32_MAX) { in FoldBinaryIntegerOpToConstant()
421 if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { in FoldBinaryIntegerOpToConstant()
427 if (constants[0] != nullptr && in FoldBinaryIntegerOpToConstant()
428 constants[0]->GetS32BitValue() == INT32_MAX) { in FoldBinaryIntegerOpToConstant()
432 if (constants[1] != nullptr && in FoldBinaryIntegerOpToConstant()
433 constants[1]->GetS32BitValue() == INT32_MIN) { in FoldBinaryIntegerOpToConstant()
451 const analysis::BoolConstant* constants[2]; in FoldBinaryBooleanOpToConstant() local
460 constants[i] = (constant != nullptr ? constant->AsBoolConstant() : nullptr); in FoldBinaryBooleanOpToConstant()
467 if (constants[i] != nullptr) { in FoldBinaryBooleanOpToConstant()
468 if (constants[i]->value()) { in FoldBinaryBooleanOpToConstant()
477 if (constants[i] != nullptr) { in FoldBinaryBooleanOpToConstant()
478 if (!constants[i]->value()) { in FoldBinaryBooleanOpToConstant()
517 // Extract the raw value of the scalar component constants in FoldVectors()
519 // is that we do not create temporary null constants as components in FoldVectors()
595 // Currently supported constants are 32-bit values or null constants. in IsFoldableConstant()
611 std::vector<const analysis::Constant*> constants; in FoldInstructionToConstant() local
613 inst->ForEachInId([&constants, &missing_constants, const_mgr, in FoldInstructionToConstant()
618 constants.push_back(nullptr); in FoldInstructionToConstant()
621 constants.push_back(const_op); in FoldInstructionToConstant()
629 folded_const = rule(context_, inst, constants); in FoldInstructionToConstant()
645 result_val = FoldScalars(inst->opcode(), constants); in FoldInstructionToConstant()