================
@@ -1629,6 +1629,22 @@ void addInstrRequirements(const MachineInstr &MI,
}
break;
}
+ case SPIRV::OpTypeVectorIdEXT: {
+ if (!ST.canUseExtension(SPIRV::Extension::SPV_EXT_long_vector))
+ reportFatalUsageError("OpTypeVectorIdEXT requires the following SPIR-V "
+ "extension: SPV_EXT_long_vector extension");
+ Reqs.addExtension(SPIRV::Extension::SPV_EXT_long_vector);
+ Reqs.addCapability(SPIRV::Capability::LongVectorEXT);
+ assert(MI.getOperand(1).isReg());
+ const MachineRegisterInfo &MRI = MI.getMF()->getRegInfo();
+ SPIRVTypeInst ElemTypeDef = MRI.getVRegDef(MI.getOperand(1).getReg());
+ if (ElemTypeDef->getOpcode() == SPIRV::OpTypePointer &&
+ ST.canUseExtension(SPIRV::Extension::SPV_INTEL_masked_gather_scatter))
{
+ Reqs.addExtension(SPIRV::Extension::SPV_INTEL_masked_gather_scatter);
+ Reqs.addCapability(SPIRV::Capability::MaskedGatherScatterINTEL);
+ }
----------------
aobolensk wrote:
This part is copy pasted from `SPIRV::OpTypeVector`. What do you think, is
there a way to unite this branches to reuse these parts?
https://github.com/llvm/llvm-project/pull/210279
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits