@@ -1441,7 +1441,8 @@ void addInstrRequirements(const MachineInstr &MI,
14411441 if (!ST.canUseExtension (SPIRV::Extension::SPV_KHR_cooperative_matrix))
14421442 report_fatal_error (" Cooperative matrix instructions require the "
14431443 " following SPIR-V extension: "
1444- " SPV_KHR_cooperative_matrix" , false );
1444+ " SPV_KHR_cooperative_matrix" ,
1445+ false );
14451446 Reqs.addExtension (SPIRV::Extension::SPV_KHR_cooperative_matrix);
14461447 Reqs.addCapability (SPIRV::Capability::CooperativeMatrixKHR);
14471448 constexpr unsigned MulAddMaxSize = 6 ;
@@ -1455,11 +1456,11 @@ void addInstrRequirements(const MachineInstr &MI,
14551456 SPIRV::Capability::CooperativeMatrixTF32ComponentTypeINTEL);
14561457 }
14571458 if (CoopOperands & SPIRV::CooperativeMatrixOperands::
1458- MatrixAAndBBFloat16ComponentsINTEL ||
1459- CoopOperands & SPIRV::CooperativeMatrixOperands::
1460- MatrixCBFloat16ComponentsINTEL ||
1459+ MatrixAAndBBFloat16ComponentsINTEL ||
1460+ CoopOperands &
1461+ SPIRV::CooperativeMatrixOperands:: MatrixCBFloat16ComponentsINTEL ||
14611462 CoopOperands & SPIRV::CooperativeMatrixOperands::
1462- MatrixResultBFloat16ComponentsINTEL) {
1463+ MatrixResultBFloat16ComponentsINTEL) {
14631464 Reqs.addExtension (SPIRV::Extension::SPV_INTEL_joint_matrix);
14641465 Reqs.addCapability (
14651466 SPIRV::Capability::CooperativeMatrixBFloat16ComponentTypeINTEL);
@@ -1474,19 +1475,19 @@ void addInstrRequirements(const MachineInstr &MI,
14741475 if (!ST.canUseExtension (SPIRV::Extension::SPV_KHR_cooperative_matrix))
14751476 report_fatal_error (" Cooperative matrix instructions require the "
14761477 " following SPIR-V extension: "
1477- " SPV_KHR_cooperative_matrix" , false );
1478+ " SPV_KHR_cooperative_matrix" ,
1479+ false );
14781480 Reqs.addExtension (SPIRV::Extension::SPV_KHR_cooperative_matrix);
14791481 Reqs.addCapability (SPIRV::Capability::CooperativeMatrixKHR);
14801482
14811483 // Check Layout operand in case if it's not a standart one and add the
14821484 // appropriate capability.
14831485 std::unordered_map<unsigned , unsigned > LayoutToInstMap = {
1484- {SPIRV::OpCooperativeMatrixLoadKHR, 3 },
1485- {SPIRV::OpCooperativeMatrixStoreKHR, 2 },
1486- {SPIRV::OpCooperativeMatrixLoadCheckedINTEL, 5 },
1487- {SPIRV::OpCooperativeMatrixStoreCheckedINTEL, 4 },
1488- {SPIRV::OpCooperativeMatrixPrefetchINTEL, 4 }
1489- };
1486+ {SPIRV::OpCooperativeMatrixLoadKHR, 3 },
1487+ {SPIRV::OpCooperativeMatrixStoreKHR, 2 },
1488+ {SPIRV::OpCooperativeMatrixLoadCheckedINTEL, 5 },
1489+ {SPIRV::OpCooperativeMatrixStoreCheckedINTEL, 4 },
1490+ {SPIRV::OpCooperativeMatrixPrefetchINTEL, 4 }};
14901491
14911492 const auto OpCode = MI.getOpcode ();
14921493 const unsigned LayoutNum = LayoutToInstMap[OpCode];
@@ -1495,11 +1496,12 @@ void addInstrRequirements(const MachineInstr &MI,
14951496 MachineInstr *MILayout = MRI.getUniqueVRegDef (RegLayout);
14961497 if (MILayout->getOpcode () == SPIRV::OpConstantI) {
14971498 const unsigned LayoutVal = MILayout->getOperand (2 ).getImm ();
1498- if (LayoutVal == static_cast < unsigned >(
1499- SPIRV::CooperativeMatrixLayout::PackedINTEL)) {
1499+ if (LayoutVal ==
1500+ static_cast < unsigned >( SPIRV::CooperativeMatrixLayout::PackedINTEL)) {
15001501 if (!ST.canUseExtension (SPIRV::Extension::SPV_INTEL_joint_matrix))
15011502 report_fatal_error (" PackedINTEL layout require the following SPIR-V "
1502- " extension: SPV_INTEL_joint_matrix" , false );
1503+ " extension: SPV_INTEL_joint_matrix" ,
1504+ false );
15031505 Reqs.addExtension (SPIRV::Extension::SPV_INTEL_joint_matrix);
15041506 Reqs.addCapability (SPIRV::Capability::PackedCooperativeMatrixINTEL);
15051507 }
@@ -1513,7 +1515,8 @@ void addInstrRequirements(const MachineInstr &MI,
15131515 if (!ST.canUseExtension (SPIRV::Extension::SPV_INTEL_joint_matrix))
15141516 report_fatal_error (" OpCooperativeMatrix[Load/Store]CheckedINTEL "
15151517 " instructions require the following SPIR-V extension: "
1516- " SPV_INTEL_joint_matrix" , false );
1518+ " SPV_INTEL_joint_matrix" ,
1519+ false );
15171520 Reqs.addExtension (SPIRV::Extension::SPV_INTEL_joint_matrix);
15181521 if (OpCode == SPIRV::OpCooperativeMatrixPrefetchINTEL) {
15191522 Reqs.addCapability (SPIRV::Capability::CooperativeMatrixPrefetchINTEL);
@@ -1527,7 +1530,8 @@ void addInstrRequirements(const MachineInstr &MI,
15271530 if (!ST.canUseExtension (SPIRV::Extension::SPV_INTEL_joint_matrix))
15281531 report_fatal_error (" OpCooperativeMatrixConstructCheckedINTEL"
15291532 " instructions require the following SPIR-V extension:"
1530- " SPV_INTEL_joint_matrix" , false );
1533+ " SPV_INTEL_joint_matrix" ,
1534+ false );
15311535 Reqs.addExtension (SPIRV::Extension::SPV_INTEL_joint_matrix);
15321536 Reqs.addCapability (
15331537 SPIRV::Capability::CooperativeMatrixCheckedInstructionsINTEL);
0 commit comments