| 678 | } |
| 679 | |
| 680 | bool InstructionFolder::IsFoldableVectorType(Instruction* type_inst) const { |
| 681 | // Support vectors with foldable components |
| 682 | if (type_inst->opcode() == spv::Op::OpTypeVector) { |
| 683 | uint32_t component_type_id = type_inst->GetSingleWordInOperand(0); |
| 684 | Instruction* def_component_type = |
| 685 | context_->get_def_use_mgr()->GetDef(component_type_id); |
| 686 | return def_component_type != nullptr && |
| 687 | IsFoldableScalarType(def_component_type); |
| 688 | } |
| 689 | // Nothing else yet. |
| 690 | return false; |
| 691 | } |
| 692 | |
| 693 | bool InstructionFolder::FoldInstruction(Instruction* inst) const { |
| 694 | bool modified = false; |
no test coverage detected