@@ -9919,236 +9919,6 @@ struct DxilInst_RawBufferVectorStore {
99199919 }
99209920};
99219921
9922- // / This instruction Multiplies a MxK dimension matrix and a K sized input
9923- // / vector
9924- struct DxilInst_MatVecMul {
9925- llvm::Instruction *Instr;
9926- // Construction and identification
9927- DxilInst_MatVecMul (llvm::Instruction *pInstr) : Instr(pInstr) {}
9928- operator bool () const {
9929- return hlsl::OP::IsDxilOpFuncCallInst (Instr, hlsl::OP::OpCode::MatVecMul);
9930- }
9931- // Validation support
9932- bool isAllowed () const { return true ; }
9933- bool isArgumentListValid () const {
9934- if (13 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
9935- return false ;
9936- return true ;
9937- }
9938- // Metadata
9939- bool requiresUniformInputs () const { return false ; }
9940- // Operand indexes
9941- enum OperandIdx {
9942- arg_inputVector = 1 ,
9943- arg_isInputUnsigned = 2 ,
9944- arg_inputInterpretation = 3 ,
9945- arg_matrixBuffer = 4 ,
9946- arg_matrixOffset = 5 ,
9947- arg_matrixIntepretation = 6 ,
9948- arg_matrixM = 7 ,
9949- arg_matrixK = 8 ,
9950- arg_matrixLayout = 9 ,
9951- arg_matrixTranspose = 10 ,
9952- arg_matrixStride = 11 ,
9953- arg_isOutputUnsigned = 12 ,
9954- };
9955- // Accessors
9956- llvm::Value *get_inputVector () const { return Instr->getOperand (1 ); }
9957- void set_inputVector (llvm::Value *val) { Instr->setOperand (1 , val); }
9958- llvm::Value *get_isInputUnsigned () const { return Instr->getOperand (2 ); }
9959- void set_isInputUnsigned (llvm::Value *val) { Instr->setOperand (2 , val); }
9960- llvm::Value *get_inputInterpretation () const { return Instr->getOperand (3 ); }
9961- void set_inputInterpretation (llvm::Value *val) { Instr->setOperand (3 , val); }
9962- llvm::Value *get_matrixBuffer () const { return Instr->getOperand (4 ); }
9963- void set_matrixBuffer (llvm::Value *val) { Instr->setOperand (4 , val); }
9964- llvm::Value *get_matrixOffset () const { return Instr->getOperand (5 ); }
9965- void set_matrixOffset (llvm::Value *val) { Instr->setOperand (5 , val); }
9966- llvm::Value *get_matrixIntepretation () const { return Instr->getOperand (6 ); }
9967- void set_matrixIntepretation (llvm::Value *val) { Instr->setOperand (6 , val); }
9968- llvm::Value *get_matrixM () const { return Instr->getOperand (7 ); }
9969- void set_matrixM (llvm::Value *val) { Instr->setOperand (7 , val); }
9970- llvm::Value *get_matrixK () const { return Instr->getOperand (8 ); }
9971- void set_matrixK (llvm::Value *val) { Instr->setOperand (8 , val); }
9972- llvm::Value *get_matrixLayout () const { return Instr->getOperand (9 ); }
9973- void set_matrixLayout (llvm::Value *val) { Instr->setOperand (9 , val); }
9974- llvm::Value *get_matrixTranspose () const { return Instr->getOperand (10 ); }
9975- void set_matrixTranspose (llvm::Value *val) { Instr->setOperand (10 , val); }
9976- llvm::Value *get_matrixStride () const { return Instr->getOperand (11 ); }
9977- void set_matrixStride (llvm::Value *val) { Instr->setOperand (11 , val); }
9978- llvm::Value *get_isOutputUnsigned () const { return Instr->getOperand (12 ); }
9979- void set_isOutputUnsigned (llvm::Value *val) { Instr->setOperand (12 , val); }
9980- };
9981-
9982- // / This instruction multiplies a MxK dimension matrix and a K sized input
9983- // / vector and adds an M-sized bias vector
9984- struct DxilInst_MatVecMulAdd {
9985- llvm::Instruction *Instr;
9986- // Construction and identification
9987- DxilInst_MatVecMulAdd (llvm::Instruction *pInstr) : Instr(pInstr) {}
9988- operator bool () const {
9989- return hlsl::OP::IsDxilOpFuncCallInst (Instr,
9990- hlsl::OP::OpCode::MatVecMulAdd);
9991- }
9992- // Validation support
9993- bool isAllowed () const { return true ; }
9994- bool isArgumentListValid () const {
9995- if (16 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
9996- return false ;
9997- return true ;
9998- }
9999- // Metadata
10000- bool requiresUniformInputs () const { return false ; }
10001- // Operand indexes
10002- enum OperandIdx {
10003- arg_inputVector = 1 ,
10004- arg_isInputUnsigned = 2 ,
10005- arg_inputInterpretation = 3 ,
10006- arg_matrixBuffer = 4 ,
10007- arg_matrixOffset = 5 ,
10008- arg_matrixIntepretation = 6 ,
10009- arg_matrixM = 7 ,
10010- arg_matrixK = 8 ,
10011- arg_matrixLayout = 9 ,
10012- arg_matrixTranspose = 10 ,
10013- arg_matrixStride = 11 ,
10014- arg_biasBuffer = 12 ,
10015- arg_biasOffset = 13 ,
10016- arg_biasIntepretation = 14 ,
10017- arg_isOutputUnsigned = 15 ,
10018- };
10019- // Accessors
10020- llvm::Value *get_inputVector () const { return Instr->getOperand (1 ); }
10021- void set_inputVector (llvm::Value *val) { Instr->setOperand (1 , val); }
10022- llvm::Value *get_isInputUnsigned () const { return Instr->getOperand (2 ); }
10023- void set_isInputUnsigned (llvm::Value *val) { Instr->setOperand (2 , val); }
10024- llvm::Value *get_inputInterpretation () const { return Instr->getOperand (3 ); }
10025- void set_inputInterpretation (llvm::Value *val) { Instr->setOperand (3 , val); }
10026- llvm::Value *get_matrixBuffer () const { return Instr->getOperand (4 ); }
10027- void set_matrixBuffer (llvm::Value *val) { Instr->setOperand (4 , val); }
10028- llvm::Value *get_matrixOffset () const { return Instr->getOperand (5 ); }
10029- void set_matrixOffset (llvm::Value *val) { Instr->setOperand (5 , val); }
10030- llvm::Value *get_matrixIntepretation () const { return Instr->getOperand (6 ); }
10031- void set_matrixIntepretation (llvm::Value *val) { Instr->setOperand (6 , val); }
10032- llvm::Value *get_matrixM () const { return Instr->getOperand (7 ); }
10033- void set_matrixM (llvm::Value *val) { Instr->setOperand (7 , val); }
10034- llvm::Value *get_matrixK () const { return Instr->getOperand (8 ); }
10035- void set_matrixK (llvm::Value *val) { Instr->setOperand (8 , val); }
10036- llvm::Value *get_matrixLayout () const { return Instr->getOperand (9 ); }
10037- void set_matrixLayout (llvm::Value *val) { Instr->setOperand (9 , val); }
10038- llvm::Value *get_matrixTranspose () const { return Instr->getOperand (10 ); }
10039- void set_matrixTranspose (llvm::Value *val) { Instr->setOperand (10 , val); }
10040- llvm::Value *get_matrixStride () const { return Instr->getOperand (11 ); }
10041- void set_matrixStride (llvm::Value *val) { Instr->setOperand (11 , val); }
10042- llvm::Value *get_biasBuffer () const { return Instr->getOperand (12 ); }
10043- void set_biasBuffer (llvm::Value *val) { Instr->setOperand (12 , val); }
10044- llvm::Value *get_biasOffset () const { return Instr->getOperand (13 ); }
10045- void set_biasOffset (llvm::Value *val) { Instr->setOperand (13 , val); }
10046- llvm::Value *get_biasIntepretation () const { return Instr->getOperand (14 ); }
10047- void set_biasIntepretation (llvm::Value *val) { Instr->setOperand (14 , val); }
10048- llvm::Value *get_isOutputUnsigned () const { return Instr->getOperand (15 ); }
10049- void set_isOutputUnsigned (llvm::Value *val) { Instr->setOperand (15 , val); }
10050- };
10051-
10052- // / This instruction Computes the outer product between column vectors and an
10053- // / MxN matrix is accumulated component-wise atomically (with device scope) in
10054- // / memory
10055- struct DxilInst_OuterProductAccumulate {
10056- llvm::Instruction *Instr;
10057- // Construction and identification
10058- DxilInst_OuterProductAccumulate (llvm::Instruction *pInstr) : Instr(pInstr) {}
10059- operator bool () const {
10060- return hlsl::OP::IsDxilOpFuncCallInst (
10061- Instr, hlsl::OP::OpCode::OuterProductAccumulate);
10062- }
10063- // Validation support
10064- bool isAllowed () const { return true ; }
10065- bool isArgumentListValid () const {
10066- if (8 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
10067- return false ;
10068- return true ;
10069- }
10070- // Metadata
10071- bool requiresUniformInputs () const { return false ; }
10072- // Operand indexes
10073- enum OperandIdx {
10074- arg_inputVector1 = 1 ,
10075- arg_inputVector2 = 2 ,
10076- arg_matrixBuffer = 3 ,
10077- arg_matrixOffset = 4 ,
10078- arg_matrixIntepretation = 5 ,
10079- arg_matrixLayout = 6 ,
10080- arg_matrixStride = 7 ,
10081- };
10082- // Accessors
10083- llvm::Value *get_inputVector1 () const { return Instr->getOperand (1 ); }
10084- void set_inputVector1 (llvm::Value *val) { Instr->setOperand (1 , val); }
10085- llvm::Value *get_inputVector2 () const { return Instr->getOperand (2 ); }
10086- void set_inputVector2 (llvm::Value *val) { Instr->setOperand (2 , val); }
10087- llvm::Value *get_matrixBuffer () const { return Instr->getOperand (3 ); }
10088- void set_matrixBuffer (llvm::Value *val) { Instr->setOperand (3 , val); }
10089- llvm::Value *get_matrixOffset () const { return Instr->getOperand (4 ); }
10090- void set_matrixOffset (llvm::Value *val) { Instr->setOperand (4 , val); }
10091- llvm::Value *get_matrixIntepretation () const { return Instr->getOperand (5 ); }
10092- void set_matrixIntepretation (llvm::Value *val) { Instr->setOperand (5 , val); }
10093- int32_t get_matrixIntepretation_val () const {
10094- return (int32_t )(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand (5 ))
10095- ->getZExtValue ());
10096- }
10097- void set_matrixIntepretation_val (int32_t val) {
10098- Instr->setOperand (5 , llvm::Constant::getIntegerValue (
10099- llvm::IntegerType::get (Instr->getContext (), 32 ),
10100- llvm::APInt (32 , (uint64_t )val)));
10101- }
10102- llvm::Value *get_matrixLayout () const { return Instr->getOperand (6 ); }
10103- void set_matrixLayout (llvm::Value *val) { Instr->setOperand (6 , val); }
10104- int32_t get_matrixLayout_val () const {
10105- return (int32_t )(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand (6 ))
10106- ->getZExtValue ());
10107- }
10108- void set_matrixLayout_val (int32_t val) {
10109- Instr->setOperand (6 , llvm::Constant::getIntegerValue (
10110- llvm::IntegerType::get (Instr->getContext (), 32 ),
10111- llvm::APInt (32 , (uint64_t )val)));
10112- }
10113- llvm::Value *get_matrixStride () const { return Instr->getOperand (7 ); }
10114- void set_matrixStride (llvm::Value *val) { Instr->setOperand (7 , val); }
10115- };
10116-
10117- // / This instruction Accumulates the components of a vector component-wise
10118- // / atomically (with device scope) to the corresponding elements of an array in
10119- // / memory
10120- struct DxilInst_VectorAccumulate {
10121- llvm::Instruction *Instr;
10122- // Construction and identification
10123- DxilInst_VectorAccumulate (llvm::Instruction *pInstr) : Instr(pInstr) {}
10124- operator bool () const {
10125- return hlsl::OP::IsDxilOpFuncCallInst (Instr,
10126- hlsl::OP::OpCode::VectorAccumulate);
10127- }
10128- // Validation support
10129- bool isAllowed () const { return true ; }
10130- bool isArgumentListValid () const {
10131- if (4 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
10132- return false ;
10133- return true ;
10134- }
10135- // Metadata
10136- bool requiresUniformInputs () const { return false ; }
10137- // Operand indexes
10138- enum OperandIdx {
10139- arg_inputVector = 1 ,
10140- arg_arrayBuffer = 2 ,
10141- arg_arrayOffset = 3 ,
10142- };
10143- // Accessors
10144- llvm::Value *get_inputVector () const { return Instr->getOperand (1 ); }
10145- void set_inputVector (llvm::Value *val) { Instr->setOperand (1 , val); }
10146- llvm::Value *get_arrayBuffer () const { return Instr->getOperand (2 ); }
10147- void set_arrayBuffer (llvm::Value *val) { Instr->setOperand (2 , val); }
10148- llvm::Value *get_arrayOffset () const { return Instr->getOperand (3 ); }
10149- void set_arrayOffset (llvm::Value *val) { Instr->setOperand (3 , val); }
10150- };
10151-
101529922// / This instruction Bitwise AND reduction of the vector returning a scalar
101539923struct DxilInst_VectorReduceAnd {
101549924 llvm::Instruction *Instr;
0 commit comments