//===-- AMDILMultiClass.td ------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // // //===----------------------------------------------------------------------===// multiclass Branch { def br: ILFormat; def bi: ILFormat; } multiclass BranchMC { def b : ILFormat; defm i8 : Branch; defm i16 : Branch; defm i32 : Branch; defm i64 : Branch; defm f32 : Branch; defm f64 : Branch; } multiclass ILFrameIndex { def i32 : ILFormat; } // Multiclass that handles constant values multiclass ILConstant { def i8 : ILFormat; def v2i8 : ILFormat; def v4i8 : ILFormat; def i16 : ILFormat; def v2i16 : ILFormat; def v4i16 : ILFormat; def i32 : ILFormat; def v2i32 : ILFormat; def v4i32 : ILFormat; def i64 : ILFormat; def v2i64 : ILFormat; def f32 : ILFormat; def v2f32 : ILFormat; def v4f32 : ILFormat; def f64 : ILFormat; def v2f64 : ILFormat; } multiclass StoreMC { def r : ILFormat; //def i : ILFormat; } multiclass LoadMC { def r : ILFormat; } multiclass GTRUNCSTORE { let store = 1, truncate = 1, global = 1 in { let sub32bit = 1 in { defm i16i8 : StoreMC; defm i32i8 : StoreMC; defm i64i8 : StoreMC; defm i32i16 : StoreMC; defm i64i16 : StoreMC; } defm i64i32 : StoreMC; defm f64f32 : StoreMC; let packed = 1 in { let sub32bit = 1 in { let packType = 0 in { defm v2i16i8 : StoreMC; defm v2i32i8 : StoreMC; defm v2i64i8 : StoreMC; } } let packType = 2 in { defm v4i16i8 : StoreMC; defm v4i32i8 : StoreMC; } let packType = 1 in { defm v2i32i16 : StoreMC; defm v2i64i16 : StoreMC; } let packType = 3 in { defm v4i32i16 : StoreMC; } } defm v2f64f32 : StoreMC; defm v2i64i32 : StoreMC; } } multiclass PTRUNCSTORE { let store = 1, truncate = 1, private = 1 in { let sub32bit = 1 in { defm i16i8 : StoreMC; defm i32i8 : StoreMC; defm i64i8 : StoreMC; defm i32i16 : StoreMC; defm i64i16 : StoreMC; } defm i64i32 : StoreMC; defm f64f32 : StoreMC; let packed = 1 in { let sub32bit = 1 in { let packType = 0 in { defm v2i16i8 : StoreMC; defm v2i32i8 : StoreMC; defm v2i64i8 : StoreMC; } } let packType = 2 in { defm v4i16i8 : StoreMC; defm v4i32i8 : StoreMC; } let packType = 1 in { defm v2i32i16 : StoreMC; defm v2i64i16 : StoreMC; } let packType = 3 in { defm v4i32i16 : StoreMC; } } defm v2f64f32 : StoreMC; defm v2i64i32 : StoreMC; } } multiclass LTRUNCSTORE { let store = 1, truncate = 1, local = 1 in { let sub32bit = 1 in { defm i16i8 : StoreMC; defm i32i8 : StoreMC; defm i64i8 : StoreMC; defm i32i16 : StoreMC; defm i64i16 : StoreMC; } defm i64i32 : StoreMC; defm f64f32 : StoreMC; let packed = 1 in { let sub32bit = 1 in { let packType = 0 in { defm v2i16i8 : StoreMC; defm v2i32i8 : StoreMC; defm v2i64i8 : StoreMC; } } let packType = 2 in { defm v4i16i8 : StoreMC; defm v4i32i8 : StoreMC; } let packType = 1 in { defm v2i32i16 : StoreMC; defm v2i64i16 : StoreMC; } let packType = 3 in { defm v4i32i16 : StoreMC; } } defm v2f64f32 : StoreMC; defm v2i64i32 : StoreMC; } } multiclass RTRUNCSTORE { let store = 1, truncate = 1, region = 1 in { let sub32bit = 1 in { defm i16i8 : StoreMC; defm i32i8 : StoreMC; defm i64i8 : StoreMC; defm i32i16 : StoreMC; defm i64i16 : StoreMC; } defm i64i32 : StoreMC; defm f64f32 : StoreMC; let packed = 1 in { let sub32bit = 1 in { let packType = 0 in { defm v2i16i8 : StoreMC; defm v2i32i8 : StoreMC; defm v2i64i8 : StoreMC; } } let packType = 2 in { defm v4i16i8 : StoreMC; defm v4i32i8 : StoreMC; } let packType = 1 in { defm v2i32i16 : StoreMC; defm v2i64i16 : StoreMC; } let packType = 3 in { defm v4i32i16 : StoreMC; } } defm v2f64f32 : StoreMC; defm v2i64i32 : StoreMC; } } multiclass STORE { let store = 1 in { let sub32bit = 1 in { defm i8 : StoreMC; defm i16 : StoreMC; } defm i32 : StoreMC; defm v2i32 : StoreMC; defm v4i32 : StoreMC; defm i64 : StoreMC; defm v2i64 : StoreMC; defm f32 : StoreMC; defm v2f32 : StoreMC; defm v4f32 : StoreMC; defm f64 : StoreMC; defm v2f64 : StoreMC; let packed = 1 in { let sub32bit = 1, packType = 1 in { defm v2i16 : StoreMC; } let packType = 3 in { defm v4i16 : StoreMC; } let packType = 0 in { defm v2i8 : StoreMC; } let packType = 2 in { defm v4i8 : StoreMC; } } } } // Multiclass that handles load operations multiclass LOAD { let load = 1 in { let swsextload = 1 in { defm i8 : LoadMC; defm i16 : LoadMC; let packed = 1 in { let packType = 0 in { defm v2i8 : LoadMC; } let packType = 2 in { defm v4i8 : LoadMC; } let packType = 1 in { defm v2i16 : LoadMC; } let packType = 3 in { defm v4i16 : LoadMC; } } } defm f32 : LoadMC; defm i32 : LoadMC; defm i64 : LoadMC; defm f64 : LoadMC; defm v2f32 : LoadMC; defm v2i32 : LoadMC; defm v2i64 : LoadMC; defm v2f64 : LoadMC; defm v4f32 : LoadMC; defm v4i32 : LoadMC; } } multiclass UAVRawLSInst { let rawuav = 1 in { let mayLoad = 1, load = 1 in { def LOADi32 : ILFormat; def LOADv2i32 : ILFormat; def LOADv4i32 : ILFormat; def LOADCACHEDi32 : ILFormat; def LOADCACHEDv2i32 : ILFormat; def LOADCACHEDv4i32 : ILFormat; def LOADCACHEDALIGNEDv2i32 : ILFormat; def LOADCACHEDALIGNEDv4i32 : ILFormat; let Predicates = [IsSIOrLaterDevice] in { def LOADi8 : ILFormat; def LOADu8 : ILFormat; def LOADi16 : ILFormat; def LOADu16 : ILFormat; def LOADCACHEDi8 : ILFormat; def LOADCACHEDu8 : ILFormat; def LOADCACHEDi16 : ILFormat; def LOADCACHEDu16 : ILFormat; } } let mayStore = 1, store = 1 in { def STOREi32 : ILFormat; def STOREv2i32 : ILFormat; def STOREv4i32 : ILFormat; let Predicates = [IsSIOrLaterDevice] in { def STOREi8 : ILFormat; def STOREi16 : ILFormat; } } } } multiclass ScratchLSInst { let scratch = 1 in { let mayLoad = 1, load = 1 in { def LOAD : ILFormat; } let mayStore = 1, store = 1 in { def STORE : ILFormat; } } } multiclass ArenaLSInst { let arenauav = 1 in { let mayStore = 1, store = 1 in { def STOREi8 : ILFormat; def STOREi16 : ILFormat; def STOREi32 : ILFormat; } let mayLoad = 1, load = 1 in { def LOADi8 : ILFormat; def LOADi16 : ILFormat; def LOADi32 : ILFormat; } } } multiclass LDSLSInst { let lds = 1 in { let mayStore = 1, store = 1 in { def STOREi8r : ILFormat; def STOREi16r : ILFormat; def STOREi32r : ILFormat; def STOREv2i32r : ILFormat; def STOREv4i32r : ILFormat; } let mayLoad = 1, load = 1 in { def LOADu8r : ILFormat; def LOADi8r : ILFormat; def LOADu16r : ILFormat; def LOADi16r : ILFormat; def LOADi32r : ILFormat; def LOADv2i32r: ILFormat; def LOADv4i32r: ILFormat; } } } multiclass GDSLSInst { let gds = 1 in { let mayStore = 1, store = 1 in { def STOREi8r : ILFormat; def STOREi16r : ILFormat; def STOREi32r : ILFormat; } let mayLoad = 1, load = 1 in { def LOADu8r : ILFormat; def LOADi8r : ILFormat; def LOADu16r : ILFormat; def LOADi16r : ILFormat; def LOADi32r : ILFormat; } } } multiclass IMAGEINFO0 { let image = 1, info = 1 in { def I1D: ILFormat; def I1DA: ILFormat; def I1DB: ILFormat; def I2D: ILFormat; def I2DA: ILFormat; def I3D: ILFormat; } } multiclass IMAGEINFO1 { let image = 1, info = 2 in { def I1D: ILFormat; def I1DA: ILFormat; def I1DB: ILFormat; def I2D: ILFormat; def I2DA: ILFormat; def I3D: ILFormat; } } multiclass IMAGEREAD { let image = 1, load = 1 in { def I1D : ILFormat; def I1DA : ILFormat; def I1DB : ILFormat; def I2D : ILFormat; def I2DA : ILFormat; def I3D : ILFormat; def I1D_UNNORM : ILFormat; def I1DA_UNNORM : ILFormat; def I1DB_UNNORM : ILFormat; def I2D_UNNORM : ILFormat; def I2DA_UNNORM : ILFormat; def I3D_UNNORM : ILFormat; } } multiclass IMAGEWRITE { let image = 1, store = 1 in { def I1D: ILFormat; def I1DA: ILFormat; def I1DB: ILFormat; def I2D: ILFormat; def I2DA: ILFormat; def I3D: ILFormat; } } // Only scalar types should generate flow control multiclass BranchInstr { def i8r : ILFormat; def i16r : ILFormat; def i32r : ILFormat; def f32r : ILFormat; let swizzle = 2 in { def i64r : ILFormat; def f64r : ILFormat; } } // Only scalar types should generate flow control multiclass BranchInstr2 { def i8rr : ILFormat; def i16rr : ILFormat; def i32rr : ILFormat; def f32rr : ILFormat; def i64rr : ILFormat; def f64rr : ILFormat; } //===--------------------------------------------------------------------===// // The base class for vector extract instructions. The vector extract // instructions take as an input value a source register and a 32bit integer // with the same encoding as specified in InsertVectorClass and produces // a result with only the swizzled component in the destination register. //===--------------------------------------------------------------------===// multiclass ExtractVectorClass { let vector = 1 in { def r : ILFormat; def i : ILFormat; } } // Class that handles the various vector extract patterns multiclass VectorExtract { defm v2f64 : ExtractVectorClass; defm v4f32 : ExtractVectorClass; defm v2f32 : ExtractVectorClass; defm v2i64 : ExtractVectorClass; defm v4i8 : ExtractVectorClass; defm v4i16 : ExtractVectorClass; defm v4i32 : ExtractVectorClass; defm v2i8 : ExtractVectorClass; defm v2i16 : ExtractVectorClass; defm v2i32 : ExtractVectorClass; } //===--------------------------------------------------------------------===// // The base class for vector concatenation. This class creates either a vec2 // or a vec4 of 32bit data types or a vec2 of 64bit data types. This is done // by swizzling either the 'x' or 'xy' components of the source operands // into the destination register. //===--------------------------------------------------------------------===// multiclass VectorConcatClass { let vector = 1 in { def rr : ILFormat; def ir : ILFormat; def ri : ILFormat; def ii : ILFormat; } } multiclass VectorConcat { defm v2f64 : VectorConcatClass; defm v2i64 : VectorConcatClass; defm v4f32 : VectorConcatClass; defm v4i32 : VectorConcatClass; defm v4i16 : VectorConcatClass; defm v4i8 : VectorConcatClass; defm v2f32 : VectorConcatClass; defm v2i32 : VectorConcatClass; defm v2i16 : VectorConcatClass; defm v2i8 : VectorConcatClass; } //===--------------------------------------------------------------------===// // The base class for vector insert instructions. It is a single dest, quad // source instruction where the last two source operands must be 32bit // immediate values that are encoding the swizzle of the source register // The src2 and src3 instructions must also be inversion of each other such // that if src2 is 0x1000300(x0z0), src3 must be 0x20004(0y0w). The values // are encoded as 32bit integer with each 8 char representing a swizzle value. // The encoding is as follows for 32bit register types: // 0x00 -> '_' // 0x01 -> 'x' // 0x02 -> 'y' // 0x03 -> 'z' // 0x04 -> 'w' // 0x05 -> 'x' // 0x06 -> 'y' // 0x07 -> 'z' // 0x08 -> 'w' // 0x09 -> '0' // The encoding is as follows for 64bit register types: // 0x00 -> "__" // 0x01 -> "xy" // 0x02 -> "zw" // 0x03 -> "xy" // 0x04 -> "zw" // 0x05 -> "00" //===--------------------------------------------------------------------===// multiclass InsertVectorClass { let vector = 1 in { def rr : ILFormat; def ir : ILFormat; def ri : ILFormat; def ii : ILFormat; } } // Class that handles the various vector insert patterns multiclass VectorInsert { defm v2f64 : InsertVectorClass; defm v4f32 : InsertVectorClass; defm v2f32 : InsertVectorClass; defm v2i64 : InsertVectorClass; defm v4i8 : InsertVectorClass; defm v4i16 : InsertVectorClass; defm v4i32 : InsertVectorClass; defm v2i8 : InsertVectorClass; defm v2i16 : InsertVectorClass; defm v2i32 : InsertVectorClass; } multiclass ConvertOpMC { def r : ILFormat; def i : ILFormat; } multiclass VectorCreate { defm v4f32 : ConvertOpMC; defm v4i16 : ConvertOpMC; defm v4i8 : ConvertOpMC; defm v4i32 : ConvertOpMC; defm v2f32 : ConvertOpMC; defm v2i16 : ConvertOpMC; defm v2i8 : ConvertOpMC; defm v2i32 : ConvertOpMC; defm v2f64 : ConvertOpMC; defm v2i64 : ConvertOpMC; } multiclass IntToAnyMC { defm i32 : ConvertOpMC; defm i8 : ConvertOpMC; defm i16 : ConvertOpMC; defm f32 : ConvertOpMC; } multiclass BitConversion { defm i32 : ConvertOpMC; defm i8 : ConvertOpMC; defm i16 : ConvertOpMC; defm f32 : ConvertOpMC; defm i64 : ConvertOpMC; defm f64 : ConvertOpMC; defm v2i8 : ConvertOpMC; defm v2i16 : ConvertOpMC; defm v2i32 : ConvertOpMC; defm v2i64 : ConvertOpMC; defm v2f32 : ConvertOpMC; defm v2f64 : ConvertOpMC; defm v4i8 : ConvertOpMC; defm v4i16 : ConvertOpMC; defm v4i32 : ConvertOpMC; defm v4f32 : ConvertOpMC; } multiclass ConvertIntMC { def r : ILFormat; def i : ILFormat; } multiclass IntrConvertF32TOF16 { defm i16 : ConvertIntMC; defm v2i16 : ConvertIntMC; defm v4i16 : ConvertIntMC; } multiclass IntrConvertF32TOI32 { defm i32 : ConvertIntMC; defm v2i32 : ConvertIntMC; defm v4i32 : ConvertIntMC; } multiclass IntrConvertF64TOI32 { defm i32 : ConvertIntMC; defm v2i32 : ConvertIntMC; } multiclass IntrConvertF16TOF32 { defm f32 : ConvertIntMC; defm v2f32 : ConvertIntMC; defm v4f32 : ConvertIntMC; } multiclass IntrConvertI32TOF32 { defm f32 : ConvertIntMC; defm v2f32 : ConvertIntMC; defm v4f32 : ConvertIntMC; } multiclass ClassExpandMC { def rr : ILFormat; def ir : ILFormat; def ri : ILFormat; def ii : ILFormat; } multiclass ClassMC { defm f64 : ClassExpandMC; defm v2f64 : ClassExpandMC; defm f32 : ClassExpandMC; defm v2f32 : ClassExpandMC; defm v4f32 : ClassExpandMC; } //----------------------------------------------------------------------------// // Multiclasses that deal with one operand instructions. //----------------------------------------------------------------------------// multiclass UnaryNegReg { def r : ILFormat; def i : ILFormat; } multiclass UnaryNegExpand : UnaryNegReg; multiclass UnaryNegExpandFP : UnaryNegReg; multiclass UnaryNegMCf32 { defm f32 : UnaryNegExpandFP; defm v2f32 : UnaryNegExpandFP; defm v4f32 : UnaryNegExpandFP; } multiclass UnaryNegMCf64 { defm f64 : UnaryNegExpandFP; defm v2f64 : UnaryNegExpandFP; } multiclass UnaryOpMCFull { def r : ILFormat; def i : ILFormat; } multiclass UnaryOpReg : UnaryOpMCFull; multiclass UnaryOpExpand : UnaryOpReg; multiclass UnaryOpExpandFP : UnaryOpReg; multiclass UnaryOpMCi8Scalar { defm i8 : UnaryOpExpand; } multiclass UnaryOpMCi8Vector { defm v2i8 : UnaryOpExpand; defm v4i8 : UnaryOpExpand; } multiclass UnaryOpMCi16Scalar { defm i16 : UnaryOpExpand; } multiclass UnaryOpMCi16Vector { defm v2i16 : UnaryOpExpand; defm v4i16 : UnaryOpExpand; } multiclass UnaryOpMCi32Scalar { defm i32 : UnaryOpExpand; } multiclass UnaryOpMCi32Vector { defm v2i32 : UnaryOpExpand; defm v4i32 : UnaryOpExpand; } multiclass UnaryOpMCi64Scalar { defm i64 : UnaryOpExpand; } multiclass UnaryOpMCi64Vector { defm v2i64 : UnaryOpExpand; } multiclass UnaryOpMCf32Scalar { defm f32 : UnaryOpExpandFP; } multiclass UnaryOpMCf32Vector { defm v2f32 : UnaryOpExpandFP; defm v4f32 : UnaryOpExpandFP; } multiclass UnaryOpMCf64Scalar { defm f64 : UnaryOpExpandFP; } multiclass UnaryOpMCf64Vector { defm v2f64 : UnaryOpExpandFP; } multiclass UnaryOpMCi32 : UnaryOpMCi32Scalar, UnaryOpMCi32Vector, UnaryOpMCi16Scalar, UnaryOpMCi16Vector, UnaryOpMCi8Scalar< opc, opn>, UnaryOpMCi8Vector< opc, opn>; multiclass UnaryOpMCi64 : UnaryOpMCi64Scalar, UnaryOpMCi64Vector; multiclass UnaryOpMCf32 : UnaryOpMCf32Scalar, UnaryOpMCf32Vector; multiclass UnaryOpMCf64 : UnaryOpMCf64Scalar, UnaryOpMCf64Vector; multiclass UnaryOpMCInt : UnaryOpMCi32 , UnaryOpMCi64; multiclass UnaryOpMCFP : UnaryOpMCf32, UnaryOpMCf64; multiclass UnaryOpMC : UnaryOpMCInt, UnaryOpMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with one operand intrinsics. //----------------------------------------------------------------------------// multiclass UnaryIntMCVoid { def r : ILFormat; def i : ILFormat; } multiclass Fence : UnaryIntMCVoid; multiclass UnaryIntMCFull { def r : ILFormat; def i : ILFormat; } multiclass FTZMCReg { def r : ILFormat; def i : ILFormat; } multiclass FTZMC { defm f32 : FTZMCReg; defm v2f32 : FTZMCReg; defm v4f32 : FTZMCReg; } multiclass UnaryIntReg { def r : ILFormat; def i : ILFormat; } multiclass UnaryIntExpand : UnaryIntReg; multiclass UnaryIntExpandFP : UnaryIntReg; multiclass UnaryIntMCi8Scalar { defm i8 : UnaryIntExpand; } multiclass UnaryIntMCi8Vector { defm v2i8 : UnaryIntExpand; defm v4i8 : UnaryIntExpand; } multiclass UnaryIntMCi16Scalar { defm i16 : UnaryIntExpand; } multiclass UnaryIntMCi16Vector { defm v2i16 : UnaryIntExpand; defm v4i16 : UnaryIntExpand; } multiclass UnaryIntMCi32Scalar { defm i32 : UnaryIntExpand; } multiclass UnaryIntMCi32Vector { defm v2i32 : UnaryIntExpand; defm v4i32 : UnaryIntExpand; } multiclass UnaryIntMCi64Scalar { defm i64 : UnaryIntExpand; } multiclass UnaryIntMCi64Vector { defm v2i64 : UnaryIntExpand; } multiclass UnaryIntMCf32Scalar { defm f32 : UnaryIntExpandFP; } multiclass UnaryIntMCf32Vector { defm v2f32 : UnaryIntExpandFP; defm v4f32 : UnaryIntExpandFP; } multiclass UnaryIntMCf64Scalar { defm f64 : UnaryIntExpandFP; } multiclass UnaryIntMCf64Vector { defm v2f64 : UnaryIntExpandFP; } multiclass UnaryIntMCi32 : UnaryIntMCi32Scalar, UnaryIntMCi32Vector, UnaryIntMCi16Scalar, UnaryIntMCi16Vector, UnaryIntMCi8Scalar< opc, opn>, UnaryIntMCi8Vector< opc, opn>; multiclass UnaryIntMCi64 : UnaryIntMCi64Scalar, UnaryIntMCi64Vector; multiclass UnaryIntMCf32 : UnaryIntMCf32Scalar, UnaryIntMCf32Vector; multiclass UnaryIntMCf64 : UnaryIntMCf64Scalar, UnaryIntMCf64Vector; multiclass UnaryIntMCInt : UnaryIntMCi32 , UnaryIntMCi64; multiclass UnaryIntMCFP : UnaryIntMCf32, UnaryIntMCf64; multiclass UnaryIntMC : UnaryIntMCInt, UnaryIntMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with one operand pattern fragments. //----------------------------------------------------------------------------// multiclass UnaryPatReg { def r : ILFormat; } multiclass UnaryNCPatReg : UnaryPatReg { def i : ILFormat; } multiclass UnaryPatExpand : UnaryNCPatReg; multiclass UnaryPatExpandFP : UnaryNCPatReg; multiclass UnaryPatMCi8Scalar { defm i8 : UnaryPatExpand; } multiclass NotMCReg { defm i8 : UnaryPatReg; defm v2i8 : UnaryPatReg; defm v4i8 : UnaryPatReg; defm i16 : UnaryPatReg; defm v2i16 : UnaryPatReg; defm v4i16 : UnaryPatReg; defm i32 : UnaryPatReg; defm v2i32 : UnaryPatReg; defm v4i32 : UnaryPatReg; defm i64 : UnaryPatReg; defm v2i64 : UnaryPatReg; } multiclass UnaryPatMCi8Vector { defm v2i8 : UnaryPatExpand; defm v4i8 : UnaryPatExpand; } multiclass UnaryPatMCi16Scalar { defm i16 : UnaryPatExpand; } multiclass UnaryPatMCi16Vector { defm v2i16 : UnaryPatExpand; defm v4i16 : UnaryPatExpand; } multiclass UnaryPatMCi32Scalar { defm i32 : UnaryPatExpand; } multiclass UnaryPatMCi32Vector { defm v2i32 : UnaryPatExpand; defm v4i32 : UnaryPatExpand; } multiclass UnaryPatMCi64Scalar { defm i64 : UnaryPatExpand; } multiclass UnaryPatMCi64Vector { defm v2i64 : UnaryPatExpand; } multiclass UnaryPatMCf32Scalar { defm f32 : UnaryPatExpandFP; } multiclass UnaryPatMCf32Vector { defm v2f32 : UnaryPatExpandFP; defm v4f32 : UnaryPatExpandFP; } multiclass UnaryPatMCf64Scalar { defm f64 : UnaryPatExpandFP; } multiclass UnaryPatMCf64Vector { defm v2f64 : UnaryPatExpandFP; } multiclass UnaryPatMCi32 : UnaryPatMCi32Scalar, UnaryPatMCi32Vector, UnaryPatMCi16Scalar, UnaryPatMCi16Vector, UnaryPatMCi8Scalar< opc, opn>, UnaryPatMCi8Vector< opc, opn>; multiclass UnaryPatMCi64 : UnaryPatMCi64Scalar, UnaryPatMCi64Vector; multiclass UnaryPatMCf32 : UnaryPatMCf32Scalar, UnaryPatMCf32Vector; multiclass UnaryPatMCf64 : UnaryPatMCf64Scalar, UnaryPatMCf64Vector; multiclass UnaryPatMCInt : UnaryPatMCi32 , UnaryPatMCi64; multiclass UnaryPatMCFP : UnaryPatMCf32, UnaryPatMCf64; multiclass UnaryPatMC : UnaryPatMCInt, UnaryPatMCFP; multiclass UnpackPatFrag { def f32r : ILFormat; def f32i : ILFormat; } //----------------------------------------------------------------------------// // Multiclasses that deal with two operand instructions that are commutable. //----------------------------------------------------------------------------// multiclass BinaryNegReg { def rr : ILFormat; def ir : ILFormat; def ri : ILFormat; def ii : ILFormat; } multiclass BinaryNegExpand : BinaryNegReg; multiclass BinaryNegExpandFP : BinaryNegReg; multiclass BinaryNegMCf32 { defm f32 : BinaryNegExpandFP; defm v2f32 : BinaryNegExpandFP; defm v4f32 : BinaryNegExpandFP; } multiclass BinaryNegMCf64 { defm f64 : BinaryNegExpandFP; defm v2f64 : BinaryNegExpandFP; } multiclass BinaryOpMCFull { def rr : ILFormat; def ri : ILFormat; def ii : ILFormat; } multiclass BinaryOpReg : BinaryOpMCFull; multiclass BinaryOpExpand : BinaryOpReg; multiclass BinaryOpMCi32Scalar { defm i8 : BinaryOpExpand; defm i16 : BinaryOpExpand; defm i32 : BinaryOpExpand; } multiclass BinaryOpMCi32Vector { defm v2i8 : BinaryOpExpand; defm v2i16 : BinaryOpExpand; defm v2i32 : BinaryOpExpand; defm v4i8 : BinaryOpExpand; defm v4i16 : BinaryOpExpand; defm v4i32 : BinaryOpExpand; } multiclass BinaryOpMCi64Scalar { defm i64 : BinaryOpExpand; } multiclass BinaryOpMCi64Vector { defm v2i64 : BinaryOpExpand; } multiclass BinaryOpMCf32Scalar { defm f32 : BinaryOpExpand; } multiclass BinaryOpMCf32Vector { defm v2f32 : BinaryOpExpand; defm v4f32 : BinaryOpExpand; } multiclass BinaryOpMCf64Scalar { defm f64 : BinaryOpExpand; } multiclass BinaryOpMCf64Vector { defm v2f64 : BinaryOpExpand; } multiclass BinaryOpMCi32 : BinaryOpMCi32Scalar, BinaryOpMCi32Vector; multiclass BinaryOpMCi64 : BinaryOpMCi64Scalar, BinaryOpMCi64Vector; multiclass BinaryOpMCf32 : BinaryOpMCf32Scalar, BinaryOpMCf32Vector; multiclass BinaryOpMCf64 : BinaryOpMCf64Scalar, BinaryOpMCf64Vector; multiclass BinaryOpMCInt : BinaryOpMCi32 , BinaryOpMCi64; multiclass BinaryOpMCFP : BinaryOpMCf32, BinaryOpMCf64; multiclass BinaryOpMC : BinaryOpMCInt, BinaryOpMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with two operand instructions that are not commutable. //----------------------------------------------------------------------------// multiclass BinaryNCOpExpand : BinaryOpExpand { def ir : ILFormat; } multiclass BinaryNCOpMCi32Scalar { defm i8 : BinaryNCOpExpand; defm i16 : BinaryNCOpExpand; defm i32 : BinaryNCOpExpand; } multiclass BinaryNCOpMCi32Vector { defm v2i8 : BinaryNCOpExpand; defm v2i16 : BinaryNCOpExpand; defm v2i32 : BinaryNCOpExpand; defm v4i8 : BinaryNCOpExpand; defm v4i16 : BinaryNCOpExpand; defm v4i32 : BinaryNCOpExpand; } multiclass BinaryNCOpMCi64Scalar { defm i64 : BinaryNCOpExpand; } multiclass BinaryNCOpMCi64Vector { defm v2i64 : BinaryNCOpExpand; } multiclass BinaryNCOpMCf32Scalar { defm f32 : BinaryNCOpExpand; } multiclass BinaryNCOpMCf32Vector { defm v2f32 : BinaryNCOpExpand; defm v4f32 : BinaryNCOpExpand; } multiclass BinaryNCOpMCf64Scalar { defm f64 : BinaryNCOpExpand; } multiclass BinaryNCOpMCf64Vector { defm v2f64 : BinaryNCOpExpand; } multiclass BinaryNCOpMCi32 : BinaryNCOpMCi32Scalar, BinaryNCOpMCi32Vector; multiclass BinaryNCOpMCi64 : BinaryNCOpMCi64Scalar, BinaryNCOpMCi64Vector; multiclass BinaryNCOpShift { def rr : ILFormat; def ri : ILFormat; } multiclass BinaryNCOpMCi32Shift { defm i8i8 : BinaryNCOpShift; defm v2i8i8 : BinaryNCOpShift; defm v4i8i8 : BinaryNCOpShift; defm i16i16 : BinaryNCOpShift; defm v2i16i16 : BinaryNCOpShift; defm v4i16i16 : BinaryNCOpShift; defm i8i32 : BinaryNCOpShift; defm v2i8i32 : BinaryNCOpShift; defm v4i8i32 : BinaryNCOpShift; defm i16i32 : BinaryNCOpShift; defm v2i16i32 : BinaryNCOpShift; defm v4i16i32 : BinaryNCOpShift; defm i32i32 : BinaryNCOpShift; defm v2i32i32 : BinaryNCOpShift; defm v4i32i32 : BinaryNCOpShift; defm i8i64 : BinaryNCOpShift; defm v2i8i64 : BinaryNCOpShift; defm i16i64 : BinaryNCOpShift; defm v2i16i64 : BinaryNCOpShift; defm i32i64 : BinaryNCOpShift; defm v2i32i64 : BinaryNCOpShift; } multiclass BinaryNCOpMCi64Shift { defm i64i64 : BinaryNCOpShift; defm v2i64i64 : BinaryNCOpShift; defm i64i32 : BinaryNCOpShift; defm v2i64i32 : BinaryNCOpShift; } multiclass BinaryNCOpMCf32 : BinaryNCOpMCf32Scalar, BinaryNCOpMCf32Vector; multiclass BinaryNCOpMCf64 : BinaryNCOpMCf64Scalar, BinaryNCOpMCf64Vector; multiclass BinaryNCOpMCInt : BinaryNCOpMCi32 , BinaryNCOpMCi64; multiclass BinaryNCOpMCFP : BinaryNCOpMCf32, BinaryNCOpMCf64; multiclass BinaryNCOpMC : BinaryNCOpMCInt, BinaryNCOpMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with two operand intrinsics. //----------------------------------------------------------------------------// multiclass BinaryIntMCFull { def rr : ILFormat; def ri : ILFormat; def ir : ILFormat; def ii : ILFormat; } multiclass BinaryIntMCFFI { defm f32 : BinaryIntMCFull; defm v2f32 : BinaryIntMCFull; defm v4f32 : BinaryIntMCFull; } multiclass BinaryIntMCDDI { defm f64 : BinaryIntMCFull; defm v2f64 : BinaryIntMCFull; } multiclass BinaryIntReg { def rr : ILFormat; def ri : ILFormat; def ii : ILFormat; } multiclass BinaryIntExpand : BinaryIntReg; multiclass BinaryIntExpandFP : BinaryIntReg; multiclass BinaryIntMCi8Scalar { defm i8 : BinaryIntExpand; } multiclass BinaryIntMCi8Vector { defm v2i8 : BinaryIntExpand; defm v4i8 : BinaryIntExpand; } multiclass BinaryIntMCi16Scalar { defm i16 : BinaryIntExpand; } multiclass BinaryIntMCi16Vector { defm v2i16 : BinaryIntExpand; defm v4i16 : BinaryIntExpand; } multiclass BinaryIntMCi32Scalar { defm i32 : BinaryIntExpand; } multiclass BinaryIntMCi32Vector { defm v2i32 : BinaryIntExpand; defm v4i32 : BinaryIntExpand; } multiclass BinaryIntMCi64Scalar { defm i64 : BinaryIntExpand; } multiclass BinaryIntMCi64Vector { defm v2i64 : BinaryIntExpand; } multiclass BinaryIntMCf32Scalar { defm f32 : BinaryIntExpandFP; } multiclass BinaryIntMCf32Vector { defm v2f32 : BinaryIntExpandFP; defm v4f32 : BinaryIntExpandFP; } multiclass BinaryIntMCf64Scalar { defm f64 : BinaryIntExpandFP; } multiclass BinaryIntMCf64Vector { defm v2f64 : BinaryIntExpandFP; } multiclass BinaryIntMCi32Only : BinaryIntMCi32Scalar, BinaryIntMCi32Vector; multiclass BinaryIntMCi32 : BinaryIntMCi32Scalar, BinaryIntMCi32Vector, BinaryIntMCi16Scalar, BinaryIntMCi16Vector, BinaryIntMCi8Scalar< opc, opn>, BinaryIntMCi8Vector< opc, opn>; multiclass BinaryIntMCi64 : BinaryIntMCi64Scalar, BinaryIntMCi64Vector; multiclass BinaryIntMCf32 : BinaryIntMCf32Scalar, BinaryIntMCf32Vector; multiclass BinaryIntMCf64 : BinaryIntMCf64Scalar, BinaryIntMCf64Vector; multiclass BinaryIntMCInt : BinaryIntMCi32 , BinaryIntMCi64; multiclass BinaryIntMCFP : BinaryIntMCf32, BinaryIntMCf64; multiclass BinaryIntMC : BinaryIntMCInt, BinaryIntMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with two operand Pattern Fragments. //----------------------------------------------------------------------------// multiclass BinaryPatReg { def rr : ILFormat; def ri : ILFormat; def ii : ILFormat; } multiclass BinaryPatExpand : BinaryPatReg; multiclass BinaryPatExpandFP : BinaryPatReg; multiclass BinaryPatMCi8Scalar { defm i8 : BinaryPatExpand; } multiclass BinaryPatMCi8Vector { defm v2i8 : BinaryPatExpand; defm v4i8 : BinaryPatExpand; } multiclass BinaryPatMCi16Scalar { defm i16 : BinaryPatExpand; } multiclass BinaryPatMCi16Vector { defm v2i16 : BinaryPatExpand; defm v4i16 : BinaryPatExpand; } multiclass BinaryPatMCi32Scalar { defm i32 : BinaryPatExpand; } multiclass BinaryPatMCi32Vector { defm v2i32 : BinaryPatExpand; defm v4i32 : BinaryPatExpand; } multiclass BinaryPatMCi64Scalar { defm i64 : BinaryPatExpand; } multiclass BinaryPatMCi64Vector { defm v2i64 : BinaryPatExpand; } multiclass BinaryPatMCf32Scalar { defm f32 : BinaryPatExpandFP; } multiclass BinaryPatMCf32Vector { defm v2f32 : BinaryPatExpandFP; defm v4f32 : BinaryPatExpandFP; } multiclass BinaryPatMCf64Scalar { defm f64 : BinaryPatExpandFP; } multiclass BinaryPatMCf64Vector { defm v2f64 : BinaryPatExpandFP; } multiclass BinaryPatMCi32Only : BinaryPatMCi32Scalar, BinaryPatMCi32Vector; multiclass BinaryPatMCi32 : BinaryPatMCi32Scalar, BinaryPatMCi32Vector, BinaryPatMCi16Scalar, BinaryPatMCi16Vector, BinaryPatMCi8Scalar< opc, opn>, BinaryPatMCi8Vector< opc, opn>; multiclass BinaryPatMCi64 : BinaryPatMCi64Scalar, BinaryPatMCi64Vector; multiclass BinaryPatMCf32 : BinaryPatMCf32Scalar, BinaryPatMCf32Vector; multiclass BinaryPatMCf64 : BinaryPatMCf64Scalar, BinaryPatMCf64Vector; multiclass BinaryPatMCInt : BinaryPatMCi32 , BinaryPatMCi64; multiclass BinaryPatMCFP : BinaryPatMCf32, BinaryPatMCf64; multiclass BinaryPatMC : BinaryPatMCInt, BinaryPatMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with three operand instructions. //----------------------------------------------------------------------------// multiclass TernaryOpReg { def rrr : ILFormat; def iii : ILFormat; def irr : ILFormat; def rir : ILFormat; def rri : ILFormat; def iir : ILFormat; def iri : ILFormat; def rii : ILFormat; } multiclass TernaryOpExpand : TernaryOpReg; multiclass TernaryOpExpandFP : TernaryOpReg; multiclass TernaryOpMCi8Scalar { defm i8 : TernaryOpExpand; } multiclass TernaryOpMCi8Vector { defm v2i8 : TernaryOpExpand; defm v4i8 : TernaryOpExpand; } multiclass TernaryOpMCi16Scalar { defm i16 : TernaryOpExpand; } multiclass TernaryOpMCi16Vector { defm v2i16 : TernaryOpExpand; defm v4i16 : TernaryOpExpand; } multiclass TernaryOpMCi32Scalar { defm i32 : TernaryOpExpand; } multiclass TernaryOpMCi32Vector { defm v2i32 : TernaryOpExpand; defm v4i32 : TernaryOpExpand; } multiclass TernaryOpMCi64Scalar { defm i64 : TernaryOpExpand; } multiclass TernaryOpMCi64Vector { defm v2i64 : TernaryOpExpand; } multiclass TernaryOpMCf32Scalar { defm f32 : TernaryOpExpandFP; } multiclass TernaryOpMCf32Vector { defm v2f32 : TernaryOpExpandFP; defm v4f32 : TernaryOpExpandFP; } multiclass TernaryOpMCf64Scalar { defm f64 : TernaryOpExpandFP; } multiclass TernaryOpMCf64Vector { defm v2f64 : TernaryOpExpandFP; } multiclass TernaryOpMCi32 : TernaryOpMCi32Scalar, TernaryOpMCi32Vector, TernaryOpMCi16Scalar, TernaryOpMCi16Vector, TernaryOpMCi8Scalar< opc, opn>, TernaryOpMCi8Vector< opc, opn>; multiclass TernaryOpMCi64 : TernaryOpMCi64Scalar, TernaryOpMCi64Vector; multiclass TernaryOpMCf32 : TernaryOpMCf32Scalar, TernaryOpMCf32Vector; multiclass TernaryOpMCf64 : TernaryOpMCf64Scalar, TernaryOpMCf64Vector; multiclass TernaryOpMCInt : TernaryOpMCi32 , TernaryOpMCi64; multiclass TernaryOpMCFP : TernaryOpMCf32, TernaryOpMCf64; multiclass TernaryOpMC : TernaryOpMCInt, TernaryOpMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with the select instruction. //----------------------------------------------------------------------------// multiclass SelectReg { def rrr : ILFormat; def iii : ILFormat; def irr : ILFormat; def rir : ILFormat; def rri : ILFormat; def iir : ILFormat; def iri : ILFormat; def rii : ILFormat; } multiclass SelectMC { defm i8 : SelectReg; defm i16 : SelectReg; defm i32 : SelectReg; defm f32 : SelectReg; let swizzle = 2 in { defm i64 : SelectReg; defm f64 : SelectReg; } defm v2i8 : SelectReg; defm v2i16 : SelectReg; defm v2i32 : SelectReg; defm v2f32 : SelectReg; let swizzle = 2 in { defm v2i64 : SelectReg; defm v2f64 : SelectReg; } defm v4i8 : SelectReg; defm v4i16 : SelectReg; defm v4i32 : SelectReg; defm v4f32 : SelectReg; } //----------------------------------------------------------------------------// // Multiclasses that deal with two operand Pattern Fragments. //----------------------------------------------------------------------------// multiclass BinaryBaseCmp { def rr : ILFormat; def ri : ILFormat; def ir : ILFormat; def ii : ILFormat; } multiclass BinaryCmpReg : BinaryBaseCmp; multiclass BinaryCmpRegFP : BinaryBaseCmp; multiclass BinaryCmpMCi32 { defm i8 : BinaryCmpReg; defm v2i8 : BinaryCmpReg; defm v4i8 : BinaryCmpReg; defm i16 : BinaryCmpReg; defm v2i16 : BinaryCmpReg; defm v4i16 : BinaryCmpReg; defm i32 : BinaryCmpReg; defm v2i32 : BinaryCmpReg; defm v4i32 : BinaryCmpReg; } multiclass BinaryCmpMCi64 { defm i64 : BinaryCmpReg; defm v2i64 : BinaryCmpReg; } multiclass BinaryCmpMCf32 { defm f32 : BinaryCmpRegFP; defm v2f32 : BinaryCmpRegFP; defm v4f32 : BinaryCmpRegFP; } multiclass BinaryCmpMCf64 { defm f64 : BinaryCmpRegFP; defm v2f64 : BinaryCmpRegFP; } /**/ //Uncomment these if LLVM doesn't support expansion of LE/GT. multiclass BinaryInvCmpReg : BinaryBaseCmp; multiclass BinaryInvCmpRegFP : BinaryBaseCmp; multiclass BinaryInvCmpMCi32 { defm i8 : BinaryInvCmpReg; defm v2i8 : BinaryInvCmpReg; defm v4i8 : BinaryInvCmpReg; defm i16 : BinaryInvCmpReg; defm v2i16 : BinaryInvCmpReg; defm v4i16 : BinaryInvCmpReg; defm i32 : BinaryInvCmpReg; defm v2i32 : BinaryInvCmpReg; defm v4i32 : BinaryInvCmpReg; } multiclass BinaryInvCmpMCi64 { defm i64 : BinaryInvCmpReg; defm v2i64 : BinaryInvCmpReg; } multiclass BinaryInvCmpMCf32 { defm f32 : BinaryInvCmpRegFP; defm v2f32 : BinaryInvCmpRegFP; defm v4f32 : BinaryInvCmpRegFP; } multiclass BinaryInvCmpMCf64 { defm f64 : BinaryInvCmpRegFP; defm v2f64 : BinaryInvCmpRegFP; } /**/ //----------------------------------------------------------------------------// // Multiclasses that deal with three operand intrinsics. //----------------------------------------------------------------------------// multiclass TernaryIntMCFull { def rrr : ILFormat; def iii : ILFormat; def irr : ILFormat; def rir : ILFormat; def rri : ILFormat; def iir : ILFormat; def iri : ILFormat; def rii : ILFormat; } multiclass TernaryIntLLIL64Scalar { defm i64 : TernaryIntMCFull; } multiclass TernaryIntReg { def rrr : ILFormat; def iii : ILFormat; def irr : ILFormat; def rir : ILFormat; def rri : ILFormat; def iir : ILFormat; def iri : ILFormat; def rii : ILFormat; } multiclass TernaryIntExpand : TernaryIntReg; multiclass TernaryIntExpandFP : TernaryIntReg; multiclass TernaryIntMCi8Scalar { defm i8 : TernaryIntExpand; } multiclass TernaryIntMCi8Vector { defm v2i8 : TernaryIntExpand; defm v4i8 : TernaryIntExpand; } multiclass TernaryIntMCi16Scalar { defm i16 : TernaryIntExpand; } multiclass TernaryIntMCi16Vector { defm v2i16 : TernaryIntExpand; defm v4i16 : TernaryIntExpand; } multiclass TernaryIntMCi32Scalar { defm i32 : TernaryIntExpand; } multiclass TernaryIntMCi32Vector { defm v2i32 : TernaryIntExpand; defm v4i32 : TernaryIntExpand; } multiclass TernaryIntMCi64Scalar { defm i64 : TernaryIntExpand; } multiclass TernaryIntMCi64Vector { defm v2i64 : TernaryIntExpand; } multiclass TernaryIntMCf32Scalar { defm f32 : TernaryIntExpandFP; } multiclass TernaryIntMCf32Vector { defm v2f32 : TernaryIntExpandFP; defm v4f32 : TernaryIntExpandFP; } multiclass TernaryIntMCf64Scalar { defm f64 : TernaryIntExpandFP; } multiclass TernaryIntMCf64Vector { defm v2f64 : TernaryIntExpandFP; } multiclass TernaryIntMCi32 : TernaryIntMCi32Scalar, TernaryIntMCi32Vector, TernaryIntMCi16Scalar, TernaryIntMCi16Vector, TernaryIntMCi8Scalar< opc, opn>, TernaryIntMCi8Vector< opc, opn>; multiclass TernaryIntMCi64 : TernaryIntMCi64Scalar, TernaryIntMCi64Vector; multiclass TernaryIntMCf32 : TernaryIntMCf32Scalar, TernaryIntMCf32Vector; multiclass TernaryIntMCf64 : TernaryIntMCf64Scalar, TernaryIntMCf64Vector; multiclass TernaryIntMCInt : TernaryIntMCi32 , TernaryIntMCi64; multiclass TernaryIntMCFP : TernaryIntMCf32, TernaryIntMCf64; multiclass TernaryIntMC : TernaryIntMCInt, TernaryIntMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with three operand pattern fragments. //----------------------------------------------------------------------------// multiclass TernaryPatReg { def rrr : ILFormat; } multiclass TernaryNCPatReg : TernaryPatReg { def irr : ILFormat; def rri : ILFormat; def iir : ILFormat; def iii : ILFormat; def rir : ILFormat; def iri : ILFormat; def rii : ILFormat; } multiclass TernaryPatExpand : TernaryNCPatReg; multiclass TernaryPatExpandFP : TernaryNCPatReg; multiclass TernaryPatMCi8Scalar { defm i8 : TernaryPatExpand; } multiclass TernaryPatMCi8Vector { defm v2i8 : TernaryPatExpand; defm v4i8 : TernaryPatExpand; } multiclass TernaryPatMCi16Scalar { defm i16 : TernaryPatExpand; } multiclass TernaryPatMCi16Vector { defm v2i16 : TernaryPatExpand; defm v4i16 : TernaryPatExpand; } multiclass TernaryPatMCi32Scalar { defm i32 : TernaryPatExpand; } multiclass TernaryPatMCi32Vector { defm v2i32 : TernaryPatExpand; defm v4i32 : TernaryPatExpand; } multiclass TernaryPatMCi64Scalar { defm i64 : TernaryPatExpand; } multiclass TernaryPatMCi64Vector { defm v2i64 : TernaryPatExpand; } multiclass TernaryPatMCf32Scalar { defm f32 : TernaryPatExpandFP; } multiclass TernaryPatMCf32Vector { defm v2f32 : TernaryPatExpandFP; defm v4f32 : TernaryPatExpandFP; } multiclass TernaryPatMCf64Scalar { defm f64 : TernaryPatExpandFP; } multiclass TernaryPatMCf64Vector { defm v2f64 : TernaryPatExpandFP; } multiclass TernaryPatMCi32 : TernaryPatMCi32Scalar, TernaryPatMCi32Vector, TernaryPatMCi16Scalar, TernaryPatMCi16Vector, TernaryPatMCi8Scalar< opc, opn>, TernaryPatMCi8Vector< opc, opn>; multiclass TernaryPatMCi64 : TernaryPatMCi64Scalar, TernaryPatMCi64Vector; multiclass TernaryPatMCf32 : TernaryPatMCf32Scalar, TernaryPatMCf32Vector; multiclass TernaryPatMCf64 : TernaryPatMCf64Scalar, TernaryPatMCf64Vector; multiclass TernaryPatMCInt : TernaryPatMCi32 , TernaryPatMCi64; multiclass TernaryPatMCFP : TernaryPatMCf32, TernaryPatMCf64; multiclass TernaryPatMC : TernaryPatMCInt, TernaryPatMCFP; //----------------------------------------------------------------------------// // Multiclasses that deal with four operand intrinsics. //----------------------------------------------------------------------------// multiclass QuaternaryIntReg { def rrrr : ILFormat; def iiii : ILFormat; def irrr : ILFormat; def rirr : ILFormat; def rrir : ILFormat; def rrri : ILFormat; def iirr : ILFormat; def rrii : ILFormat; def irir : ILFormat; def irri : ILFormat; def riir : ILFormat; def riri : ILFormat; def iiir : ILFormat; def iiri : ILFormat; def irii : ILFormat; def riii : ILFormat; } multiclass QuaternaryIntExpand : QuaternaryIntReg; multiclass QuaternaryIntExpandFP : QuaternaryIntReg; multiclass QuaternaryIntMCi8Scalar { defm i8 : QuaternaryIntExpand; } multiclass QuaternaryIntMCi8Vector { defm v2i8 : QuaternaryIntExpand; defm v4i8 : QuaternaryIntExpand; } multiclass QuaternaryIntMCi16Scalar { defm i16 : QuaternaryIntExpand; } multiclass QuaternaryIntMCi16Vector { defm v2i16 : QuaternaryIntExpand; defm v4i16 : QuaternaryIntExpand; } multiclass QuaternaryIntMCi32Scalar { defm i32 : QuaternaryIntExpand; } multiclass QuaternaryIntMCi32Vector { defm v2i32 : QuaternaryIntExpand; defm v4i32 : QuaternaryIntExpand; } multiclass QuaternaryIntMCi64Scalar { defm i64 : QuaternaryIntExpand; } multiclass QuaternaryIntMCi64Vector { defm v2i64 : QuaternaryIntExpand; } multiclass QuaternaryIntMCf32Scalar { defm f32 : QuaternaryIntExpandFP; } multiclass QuaternaryIntMCf32Vector { defm v2f32 : QuaternaryIntExpandFP; defm v4f32 : QuaternaryIntExpandFP; } multiclass QuaternaryIntMCf64Scalar { defm f64 : QuaternaryIntExpandFP; } multiclass QuaternaryIntMCf64Vector { defm v2f64 : QuaternaryIntExpandFP; } multiclass QuaternaryIntMCi32 : QuaternaryIntMCi32Scalar, QuaternaryIntMCi32Vector, QuaternaryIntMCi16Scalar, QuaternaryIntMCi16Vector, QuaternaryIntMCi8Scalar< opc, opn>, QuaternaryIntMCi8Vector< opc, opn>; multiclass QuaternaryIntMCi64 : QuaternaryIntMCi64Scalar, QuaternaryIntMCi64Vector; multiclass QuaternaryIntMCf32 : QuaternaryIntMCf32Scalar, QuaternaryIntMCf32Vector; multiclass QuaternaryIntMCf64 : QuaternaryIntMCf64Scalar, QuaternaryIntMCf64Vector; multiclass QuaternaryIntMCInt : QuaternaryIntMCi32 , QuaternaryIntMCi64; multiclass QuaternaryIntMCFP : QuaternaryIntMCf32, QuaternaryIntMCf64; multiclass QuaternaryIntMC : QuaternaryIntMCInt, QuaternaryIntMCFP; multiclass BitAlignPatFragCI32 { def i32rrrr : ILFormat; def i32irrr : ILFormat; def i32rirr : ILFormat; def i32rrir : ILFormat; def i32rrri : ILFormat; def i32iirr : ILFormat; def i32irir : ILFormat; def i32irri : ILFormat; def i32riir : ILFormat; def i32riri : ILFormat; def i32rrii : ILFormat; def i32iiir : ILFormat; def i32iiri : ILFormat; def i32riii : ILFormat; def i32irii : ILFormat; def i32iiii : ILFormat; } // atomic global load multiclass AtomGLoadMC { let load = 1, global = 1, atomic = 1, rawuav = 1 in { def i8 : AtomGLoadClass; def i16 : AtomGLoadClass; def i32 : AtomGLoadClass; def v2i32 : AtomGLoadClass; def v4i32 : AtomGLoadClass; } } // atomic global store multiclass AtomGStoreMC { let store = 1, global = 1, atomic = 1, rawuav = 1 in { def i8 : AtomGStoreClass; def i16 : AtomGStoreClass; def i32 : AtomGStoreClass; def v2i32 : AtomGStoreClass; def v4i32 : AtomGStoreClass; } }