MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / IsFoldableScalarType

Method IsFoldableScalarType

source/opt/fold.cpp:667–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667bool InstructionFolder::IsFoldableScalarType(Instruction* type_inst) const {
668 // Support 32-bit integers.
669 if (type_inst->opcode() == spv::Op::OpTypeInt) {
670 return type_inst->GetSingleWordInOperand(0) == 32;
671 }
672 // Support booleans.
673 if (type_inst->opcode() == spv::Op::OpTypeBool) {
674 return true;
675 }
676 // Nothing else yet.
677 return false;
678}
679
680bool InstructionFolder::IsFoldableVectorType(Instruction* type_inst) const {
681 // Support vectors with foldable components

Callers 1

Calls 2

opcodeMethod · 0.45

Tested by

no test coverage detected