| 665 | } |
| 666 | |
| 667 | bool 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 | |
| 680 | bool InstructionFolder::IsFoldableVectorType(Instruction* type_inst) const { |
| 681 | // Support vectors with foldable components |
no test coverage detected