//===-- AMDILInstructions.td - TODO: Add brief description -------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //==-----------------------------------------------------------------------===// // Operations in this file are generic to all data types // This opcode has custom swizzle pattern encoded in Swizzle Encoder let isReMaterializable = 1, isAsCheapAsAMove = 1 in { defm LOADCONST : ILConstant<"mov $dst, $val">; defm MOVE : UnaryOpMC; defm PHIMOVE : UnaryOpMC; } defm BINARY_NOT : UnaryOpMC; defm BINARY_OR : BinaryOpMC; defm BINARY_AND : BinaryOpMC; defm BINARY_XOR : BinaryOpMC; defm AND : BinaryOpMCInt; defm CMOV : BinaryOpMC; defm DIV_INF : BinaryOpMC; defm SMAX : BinaryOpMCInt; // This opcode has custom swizzle pattern encoded in Swizzle Encoder for 64bit // instructions defm CMOVLOG : TernaryOpMC; // This opcode has a custom swizzle pattern in the Swizzle Encoder and // should never be selected in ISel. It should only be generated in the // I/O expansion code. These are different from the CMOVLOG instruction // in that the src0 argument uses a custom swizzle for the Y/Z/W // vector channel respectively instead of the default channel. def CMOVLOG_Y_i32 : ThreeInOneOut; def CMOVLOG_Z_i32 : ThreeInOneOut; def CMOVLOG_W_i32 : ThreeInOneOut; defm SELECTBIN : TernaryOpMCScalar; //===---------------------------------------------------------------------===// // Signed 8bit integer math instructions start here //===---------------------------------------------------------------------===// def INTTOANY_i8 : OneInOneOut; //===---------------------------------------------------------------------===// // Signed 16bit integer math instructions start here //===---------------------------------------------------------------------===// def INTTOANY_i16: OneInOneOut; //===---------------------------------------------------------------------===// // Signed 32bit integer math instructions start here //===---------------------------------------------------------------------===// defm NEGATE : UnaryOpMCi32; defm SMUL : BinaryOpMCi32; defm SMULHI : BinaryOpMCi32; defm SHL : BinaryOpMCi32Const; defm SHR : BinaryOpMCi32Const; defm SHLVEC : BinaryOpMCi32; defm SHRVEC : BinaryOpMCi32; defm ADD : BinaryOpMCi32; defm CUSTOM_XOR : BinaryOpMCInt; // get rid of the addri via the tablegen instead of custom lowered instruction defm CUSTOM_ADD : BinaryOpMCi32; defm EADD : BinaryOpMCi32; def INTTOANY_i32: OneInOneOut; // Integer offsets for addressing // This opcode has custom swizzle pattern encoded in Swizzle Encoder def ADDir : TwoInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def ADDri : TwoInOneOut; defm IFFB_HI : UnaryOpMCi32; defm IFFB_LO : UnaryOpMCi32; let mayLoad = 0, mayStore = 0 in { defm ABS : UnaryIntrinsicInt; defm BITCOUNT : UnaryIntrinsicInt; defm FFB_LO : UnaryIntrinsicInt; defm FFB_HI : UnaryIntrinsicInt; defm FFB_SGN : UnaryIntrinsicInt; defm IMULHI : BinaryIntrinsicInt; let Predicates = [HasHWSign24Bit] in { defm IMUL24 : BinaryIntrinsicInt; defm IMULHI24 : BinaryIntrinsicInt; defm IMAD24 : TernaryIntrinsicInt; } defm CARRY : BinaryIntrinsicInt; defm BORROW : BinaryIntrinsicInt; defm IMIN : BinaryIntrinsicInt; defm IMAX : BinaryIntrinsicInt; defm CMOV_LOG : TernaryIntrinsicInt; defm IBIT_EXTRACT : TernaryIntrinsicInt; defm IMAD : TernaryIntrinsicInt; defm SAD : TernaryIntrinsicInt; defm SADHI : TernaryIntrinsicInt; } def SAD4_i32 : ThreeInOneOut; def FTOV4U8_i32 : OneInOneOut; //===---------------------------------------------------------------------===// // Unsigned 32bit integer math instructions start here //===---------------------------------------------------------------------===// defm UMUL : BinaryOpMCi32; defm UMULHI : BinaryOpMCi32; defm USHR : BinaryOpMCi32Const; defm USHRVEC : BinaryOpMCi32; defm UDIV : BinaryOpMCi32; defm NATIVE_UDIV : BinaryIntrinsicInt; let mayLoad=0, mayStore=0 in { defm UBIT_REVERSE : UnaryIntrinsicInt; defm UMULHI_INT : BinaryIntrinsicInt; defm UMULHI24 : BinaryIntrinsicInt; defm UMUL24 : BinaryIntrinsicInt; defm UMIN : BinaryIntrinsicInt; defm UMAX : BinaryIntrinsicInt; defm UBIT_EXTRACT : TernaryIntrinsicInt; defm UBIT_INSERT : QuaternaryIntrinsicInt; defm BFI : TernaryIntrinsicInt; defm BFM : BinaryIntrinsicInt; defm UMAD : TernaryIntrinsicInt; defm UMAD24 : TernaryIntrinsicInt; defm U4LERP : TernaryIntrinsicInt; defm BITALIGN : TernaryIntrinsicInt; defm BYTEALIGN : TernaryIntrinsicInt; } //===---------------------------------------------------------------------===// // Signed 64bit integer math instructions start here //===---------------------------------------------------------------------===// // This opcode has custom swizzle pattern encoded in Swizzle Encoder def LNEGATE : OneInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def LNEGATE_v2i64: OneInOneOut; let Predicates = [HasHW64Bit] in { def LADD : TwoInOneOut; defm IMIN64 : BinaryIntrinsicLong; defm UMIN64 : BinaryIntrinsicLong; defm IMAX64 : BinaryIntrinsicLong; defm UMAX64 : BinaryIntrinsicLong; } let Predicates = [HasHW64Bit] in { def LSHR : TwoInOneOut; def LSHL : TwoInOneOut; } //===---------------------------------------------------------------------===// // Unsigned 64bit integer math instructions start here //===---------------------------------------------------------------------===// let Predicates = [HasTmrRegister] in { def Tmr : ILFormat; } let Predicates = [HasDeviceIDInst] in { def CU_ID : ILFormat; def WAVE_ID : ILFormat; } let Predicates = [HasHW64Bit] in { def LUSHR : TwoInOneOut; } //===---------------------------------------------------------------------===// // Generic Float Instructions //===---------------------------------------------------------------------===// let hasIEEEFlag = 1 in { defm MUL_IEEE : BinaryOpMCFloat; } defm ADD : BinaryOpMCFloat; //===---------------------------------------------------------------------===// // float math instructions start here //===---------------------------------------------------------------------===// let mayLoad=0, mayStore=0 in { defm ABS : UnaryIntrinsicFloat; defm FRAC : UnaryIntrinsicFloat; defm PIREDUCE : UnaryIntrinsicFloat; defm ROUND_NEAREST : UnaryIntrinsicFloat; defm ROUND_NEGINF : UnaryIntrinsicFloat; defm ROUND_POSINF : UnaryIntrinsicFloat; defm ROUND_ZERO : UnaryIntrinsicFloat; defm ACOS : UnaryIntrinsicFloatScalar; defm ATAN : UnaryIntrinsicFloatScalar; defm ASIN : UnaryIntrinsicFloatScalar; defm TAN : UnaryIntrinsicFloatScalar; defm SIN : UnaryIntrinsicFloatScalar; defm COS : UnaryIntrinsicFloatScalar; defm SQRT : UnaryIntrinsicFloatScalar; defm EXP : UnaryIntrinsicFloatScalar; defm EXPVEC : UnaryIntrinsicFloat; defm SQRTVEC : UnaryIntrinsicFloat; defm COSVEC : UnaryIntrinsicFloat; defm SINVEC : UnaryIntrinsicFloat; defm LOGVEC : UnaryIntrinsicFloat; defm RSQVEC : UnaryIntrinsicFloat; defm EXN : UnaryIntrinsicFloatScalar; defm SIGN : UnaryIntrinsicFloat; defm LENGTH : UnaryIntrinsicFloat; defm POW : BinaryIntrinsicFloat; } let hasIEEEFlag = 1 in { let mayLoad = 0, mayStore=0 in { defm MIN : BinaryIntrinsicFloat; defm MAX : BinaryIntrinsicFloat; defm MAD : TernaryIntrinsicFloat; } defm MOD : BinaryOpMCf32; } let hasZeroOpFlag = 1 in { let mayLoad = 0, mayStore=0 in { defm LN : UnaryIntrinsicFloatScalar; defm LOG : UnaryIntrinsicFloatScalar; defm RSQ : UnaryIntrinsicFloatScalar; defm DIV : BinaryIntrinsicFloat; } } let mayLoad = 0, mayStore=0 in { defm CLAMP : TernaryIntrinsicFloat; defm FMA : TernaryIntrinsicFloat; defm LERP : TernaryIntrinsicFloat; } defm SUB : BinaryOpMCf32; defm FABS : UnaryOpMCf32; defm FMAD : TernaryOpMCf32; defm NEAR : UnaryOpMCf32; defm RND_Z : UnaryOpMCf32; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def NEG_f32 : OneInOneOut; def INTTOANY_f32 : OneInOneOut; let hasIEEEFlag = 1 in { def DP2ADD_f32 : ThreeInOneOut; def DP2_f32 : TwoInOneOut; def DP3_f32 : TwoInOneOut; def DP4_f32 : TwoInOneOut; } defm UNPACK_B0 : IntrConvertI32TOF32; defm UNPACK_B1 : IntrConvertI32TOF32; defm UNPACK_B2 : IntrConvertI32TOF32; defm UNPACK_B3 : IntrConvertI32TOF32; defm FTOI_FLR : IntrConvertF32TOI32; defm FTOI_RPI : IntrConvertF32TOI32; defm HTOF : IntrConvertF16TOF32; defm FTOH : IntrConvertF32TOF16; defm FTOH_NEAR : IntrConvertF32TOF16; defm FTOH_NEG_INF : IntrConvertF32TOF16; defm FTOH_PLUS_INF : IntrConvertF32TOF16; //===---------------------------------------------------------------------===// // float math instructions end here //===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===// // float2 math instructions start here //===---------------------------------------------------------------------===// // This opcode has custom swizzle pattern encoded in Swizzle Encoder def NEG_v2f32 : OneInOneOut; //===---------------------------------------------------------------------===// // float2 math instructions end here //===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===// // float4 math instructions start here //===---------------------------------------------------------------------===// // This opcode has custom swizzle pattern encoded in Swizzle Encoder def NEG_v4f32 : OneInOneOut; //===---------------------------------------------------------------------===// // float4 math instructions end here //===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===// // double math instructions start here //===---------------------------------------------------------------------===// // This opcode has custom swizzle pattern encoded in Swizzle Encoder def SUB_f64 : TwoInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def SUB_v2f64 : TwoInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def NEG_f64 : OneInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def NEG_v2f64 : OneInOneOut; let mayLoad = 0, mayStore=0 in { defm MIN : BinaryIntrinsicDouble; defm MAX : BinaryIntrinsicDouble; defm DIV : BinaryIntrinsicDouble; defm MAD : TernaryIntrinsicDouble; defm DFMA : TernaryIntrinsicDouble; defm FRAC : UnaryIntrinsicDouble; defm SQRT : UnaryIntrinsicDouble; defm RSQ : UnaryIntrinsicDoubleScalar; defm RCP : UnaryIntrinsicDoubleScalar; defm DMAD : TernaryOpMCf64; } def FREXP_f64 : OneInOneOut; def LDEXP_f64 : TwoInOneOut; def LDEXP_v2f64 : TwoInOneOut; //===---------------------------------------------------------------------===// // double math instructions end here //===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===// // Various Macros //===---------------------------------------------------------------------===// def MACRO__sdiv_i8 : BinaryMacro< GPRI8, GPRI8, GPRI8, sdiv>; def MACRO__sdiv_i16 : BinaryMacro; def MACRO__sdiv_i32 : BinaryMacro; def MACRO__udiv_i8 : BinaryMacro< GPRI8, GPRI8, GPRI8, udiv>; def MACRO__udiv_i16 : BinaryMacro; def MACRO__udiv_i32 : BinaryMacro; def MACRO__smod_i8 : BinaryMacro< GPRI8, GPRI8, GPRI8, srem>; def MACRO__smod_i16 : BinaryMacro; def MACRO__smod_i32 : BinaryMacro; def MACRO__umod_i8 : BinaryMacro< GPRI8, GPRI8, GPRI8, urem>; def MACRO__umod_i16 : BinaryMacro; def MACRO__umod_i32 : BinaryMacro; let Predicates = [HasSWDDiv] in { def MACRO__ddiv_f64: BinaryMacro; } let Predicates = [HasHWDDiv] in { def MACRO__ddiv_f64_fma: BinaryMacro; } def MACRO__ftol_i64 : UnaryMacro; def MACRO__ftoul_i64 : UnaryMacro; def MACRO__ultof_f32 : UnaryMacro; def MACRO__ltof_f32 : UnaryMacro; let Predicates = [HasSW64Mul] in { def MACRO__mul_i64 : BinaryMacro; def MACRO__mul_v2i64 : BinaryMacro; } let Predicates = [HasSW64DivMod] in { def MACRO__sdiv_i64 : BinaryMacro; def MACRO__udiv_i64 : BinaryMacro; def MACRO__smod_i64 : BinaryMacro; def MACRO__umod_i64 : BinaryMacro; } let Predicates = [HasHW64DivMod] in { defm SDIV : BinaryOpMCi64; defm UDIV : BinaryOpMCi64; defm SMOD : BinaryOpMCi64; defm UMOD : BinaryOpMCi64; } let Predicates = [HasHW64Mul] in { defm SMUL : BinaryOpMCi64; defm UMUL : BinaryOpMCi64; } def MACRO__shr_v2i64 : BinaryMacro; def MACRO__shl_v2i64 : BinaryMacro; def MACRO__sra_v2i64 : BinaryMacro; let Predicates = [HasSW64Bit] in { def MACRO__shr_i64 : BinaryMacro; def MACRO__shl_i64 : BinaryMacro; def MACRO__sra_i64 : BinaryMacro; } //===---------------------------------------------------------------------===// // Comparison Instructions //===---------------------------------------------------------------------===// let usesCustomInserter = 1 in { defm CMP : Compare<"Pseudo comparison instr">; } //===---------------------------------------------------------------------===// // 32-bit floating point operations //===---------------------------------------------------------------------===// def FEQ : TwoInOneOut; def FGE : TwoInOneOut; def FLT : TwoInOneOut; def FLT_v2f32 : TwoInOneOut; def FLT_v4f32 : TwoInOneOut; def FNE : TwoInOneOut; //===---------------------------------------------------------------------===// //TODO: need to correctly define comparison instructions //===---------------------------------------------------------------------===// def DEQ : TwoInOneOut; def DEQ_v2f64 : TwoInOneOut; def DGE : TwoInOneOut; def DLT : TwoInOneOut; def DNE : TwoInOneOut; //===---------------------------------------------------------------------===// //TODO: need to correctly define comparison instructions //===---------------------------------------------------------------------===// def IEQ : TwoInOneOut; def IEQ_v2i32 : TwoInOneOut; def IEQ_v4i32 : TwoInOneOut; def IGE : TwoInOneOut; def IGE_v2i32 : TwoInOneOut; def IGE_v4i32 : TwoInOneOut; def ILT : TwoInOneOut; def ILT_v2i32 : TwoInOneOut; def ILT_v4i32 : TwoInOneOut; def INE : TwoInOneOut; def INE_v2i32 : TwoInOneOut; def INE_v4i32 : TwoInOneOut; let Predicates = [HasHW64Bit] in { def LEQ : TwoInOneOut; def LGE : TwoInOneOut; def LLE : TwoInOneOut; def LGT : TwoInOneOut; def LLT : TwoInOneOut; def LNE : TwoInOneOut; } //===---------------------------------------------------------------------===// // Unsigned Integer Operations //===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===// //TODO: need to correctly define comparison instructions //===---------------------------------------------------------------------===// def UEQ : TwoInOneOut; def UEQ_v2i32 : TwoInOneOut; def UEQ_v4i32 : TwoInOneOut; def ULE : TwoInOneOut; def ULE_v2i32 : TwoInOneOut; def ULE_v4i32 : TwoInOneOut; def UGT : TwoInOneOut; def UGT_v2i32 : TwoInOneOut; def UGT_v4i32 : TwoInOneOut; def UGE : TwoInOneOut; def UGE_v2i32 : TwoInOneOut; def UGE_v4i32 : TwoInOneOut; def ULT : TwoInOneOut; def ULT_v2i32 : TwoInOneOut; def ULT_v4i32 : TwoInOneOut; def UNE : TwoInOneOut; def UNE_v2i32 : TwoInOneOut; def UNE_v4i32 : TwoInOneOut; let Predicates = [HasHW64Bit] in { def ULLE : TwoInOneOut; def ULGT : TwoInOneOut; def ULGE : TwoInOneOut; def ULLT : TwoInOneOut; } //===---------------------------------------------------------------------===// // Scalar ==> Scalar conversion functions //===---------------------------------------------------------------------===// // f32 ==> f64 def FTOD : UnaryOp; // f64 ==> f32 def DTOF : UnaryOp; // f32 ==> i32 signed def FTOI : UnaryOp; def FTOI_v2i32 : UnaryOp; def FTOI_v4i32 : UnaryOp; // i32 ==> f32 signed def ITOF : UnaryOp; def ITOF_v2f32 : UnaryOp; def ITOF_v4f32 : UnaryOp; // f32 ==> i32 unsigned def FTOU : UnaryOp; def FTOU_v2i32 : UnaryOp; def FTOU_v4i32 : UnaryOp; // i32 ==> f32 unsigned def UTOF : UnaryOp; def UTOF_v2f32 : UnaryOp; def UTOF_v4f32 : UnaryOp; // Get upper 32 bits of f64 // This opcode has custom swizzle pattern encoded in Swizzle Encoder def DHI : OneInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def DHI_v2f64 : OneInOneOut; // Get lower 32 bits of f64 // This opcode has custom swizzle pattern encoded in Swizzle Encoder def DLO : OneInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def DLO_v2f64 : OneInOneOut; // Convert two 32 bit integers into a f64 // This opcode has custom swizzle pattern encoded in Swizzle Encoder def DCREATE : TwoInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def DCREATE_v2f64 : TwoInOneOut; // Get upper 32 bits of i64 // This opcode has custom swizzle pattern encoded in Swizzle Encoder def LHI : OneInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def LHI_v2i64 : OneInOneOut; // Get lower 32 bits of i64 // This opcode has custom swizzle pattern encoded in Swizzle Encoder def LLO : OneInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def LLO_v2i64 : OneInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def HILO_BITOR_v4i16 : TwoInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def HILO_BITOR_v2i32 : TwoInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def HILO_BITOR_v2i64 : TwoInOneOut; // Convert two 32 bit integers into a i64 // This opcode has custom swizzle pattern encoded in Swizzle Encoder def LCREATE : TwoInOneOut; // This opcode has custom swizzle pattern encoded in Swizzle Encoder def LCREATE_v2i64 : TwoInOneOut; //===---------------------------------------------------------------------===// // Scalar ==> Vector conversion functions //===---------------------------------------------------------------------===// // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm VCREATE : UnaryOpMCVec; //===---------------------------------------------------------------------===// // Vector ==> Scalar conversion functions //===---------------------------------------------------------------------===// // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm VEXTRACT : VectorExtract; //===---------------------------------------------------------------------===// // Vector ==> Vector conversion functions //===---------------------------------------------------------------------===// // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm VINSERT : VectorInsert; // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm VCONCAT : VectorConcat; //===---------------------------------------------------------------------===// // Bit conversion functions //===---------------------------------------------------------------------===// defm IL_ASCHAR : BitConversion; defm IL_ASSHORT : BitConversion; defm IL_ASINT : BitConversion; defm IL_ASFLOAT : BitConversion; defm IL_ASDOUBLE : BitConversion; defm IL_ASLONG : BitConversion; defm IL_ASV2CHAR : BitConversion; defm IL_ASV2SHORT : BitConversion; defm IL_ASV2INT : BitConversion; defm IL_ASV2FLOAT : BitConversion; defm IL_ASV2DOUBLE : BitConversion; defm IL_ASV2LONG : BitConversion; defm IL_ASV4CHAR : BitConversion; defm IL_ASV4SHORT : BitConversion; defm IL_ASV4INT : BitConversion; defm IL_ASV4FLOAT : BitConversion; let Predicates = [Has32BitPtr] in { let isCodeGenOnly=1 in { //===----------------------------------------------------------------------===// // Store Memory Operations //===----------------------------------------------------------------------===// defm GLOBALTRUNCSTORE : GTRUNCSTORE<"!global trunc store">; defm GLOBALSTORE : STORE<"!global store" , global_store>; defm LOCALTRUNCSTORE : LTRUNCSTORE<"!local trunc store">; defm LOCALSTORE : STORE<"!local store" , local_store>; defm PRIVATETRUNCSTORE : PTRUNCSTORE<"!private trunc store">; defm PRIVATESTORE : STORE<"!private store" , private_store>; defm REGIONTRUNCSTORE : RTRUNCSTORE<"!region trunc store">; defm REGIONSTORE : STORE<"!region hw store" , region_store>; //===---------------------------------------------------------------------===// // Load Memory Operations //===---------------------------------------------------------------------===// defm GLOBALLOAD : LOAD<"!global load" , global_load>; defm GLOBALZEXTLOAD : LOAD<"!global zext load" , global_zext_load>; defm GLOBALSEXTLOAD : LOAD<"!global sext load" , global_sext_load>; defm GLOBALAEXTLOAD : LOAD<"!global aext load" , global_aext_load>; defm PRIVATELOAD : LOAD<"!private load" , private_load>; defm PRIVATEZEXTLOAD : LOAD<"!private zext load" , private_zext_load>; defm PRIVATESEXTLOAD : LOAD<"!private sext load" , private_sext_load>; defm PRIVATEAEXTLOAD : LOAD<"!private aext load" , private_aext_load>; defm CPOOLLOAD : LOAD<"!constant pool load" , cp_load>; defm CPOOLZEXTLOAD : LOAD<"!constant pool zext load", cp_zext_load>; defm CPOOLSEXTLOAD : LOAD<"!constant pool sext load", cp_sext_load>; defm CPOOLAEXTLOAD : LOAD<"!constant aext pool load", cp_aext_load>; defm CONSTANTLOAD : LOAD<"!constant load" , constant_load>; defm CONSTANTZEXTLOAD : LOAD<"!constant zext load" , constant_zext_load>; defm CONSTANTSEXTLOAD : LOAD<"!constant sext load" , constant_sext_load>; defm CONSTANTAEXTLOAD : LOAD<"!constant aext load" , constant_aext_load>; defm LOCALLOAD : LOAD<"!local load" , local_load>; defm LOCALZEXTLOAD : LOAD<"!local zext load" , local_zext_load>; defm LOCALSEXTLOAD : LOAD<"!local sext load" , local_sext_load>; defm LOCALAEXTLOAD : LOAD<"!local aext load" , local_aext_load>; defm REGIONLOAD : LOAD<"!region load" , region_load>; defm REGIONZEXTLOAD : LOAD<"!region zext load" , region_zext_load>; defm REGIONSEXTLOAD : LOAD<"!region sext load" , region_sext_load>; defm REGIONAEXTLOAD : LOAD<"!region aext load" , region_aext_load>; } //===---------------------------------------------------------------------===// // IO Expansion Load/Store Instructions //===---------------------------------------------------------------------===// let mayLoad = 1 in { // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHLOAD : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def CBLOAD : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSLOAD : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSLOAD_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSLOAD_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSLOAD_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOADVEC : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOADVEC_v2i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOADVEC_v4i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD_i8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD_u8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD_i16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD_u16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD_i8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD_i16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD_Y_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD_Z_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD_W_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOAD_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOAD_v2i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOAD_v4i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOADCACHED_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOADCACHED_v2i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOADCACHED_v4i32 : TwoInOneOut; } let mayStore = 1 in { // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE_X : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE_XY : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE_ZW : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSSTORE : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSSTORE_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSSTORE_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSSTORE_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTOREVEC : ThreeInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTOREVEC_v2i32 : ThreeInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTOREVEC_v4i32 : ThreeInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE_i8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE_i16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE_i8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE_i16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE_Y_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE_Z_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE_W_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWSTORE_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWSTORE_v2i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWSTORE_v4i32 : TwoInOneOut; } } let Predicates = [Has64BitPtr] in { let isCodeGenOnly=1 in { //===----------------------------------------------------------------------===// // Store Memory Operations //===----------------------------------------------------------------------===// defm GLOBALTRUNCSTORE64 : GTRUNCSTORE64<"!global trunc store">; defm GLOBALSTORE64 : STORE64<"!global store" , global_store>; defm LOCALTRUNCSTORE64 : LTRUNCSTORE64<"!local trunc store">; defm LOCALSTORE64 : STORE64<"!local store" , local_store>; defm PRIVATETRUNCSTORE64 : PTRUNCSTORE64<"!private trunc store">; defm PRIVATESTORE64 : STORE64<"!private store" , private_store>; defm REGIONTRUNCSTORE64 : RTRUNCSTORE64<"!region trunc store">; defm REGIONSTORE64 : STORE64<"!region hw store" , region_store>; //===---------------------------------------------------------------------===// // Load Memory Operations //===---------------------------------------------------------------------===// defm GLOBALLOAD64 : LOAD64<"!global load" , global_load>; defm GLOBALZEXTLOAD64 : LOAD64<"!global zext load" , global_zext_load>; defm GLOBALSEXTLOAD64 : LOAD64<"!global sext load" , global_sext_load>; defm GLOBALAEXTLOAD64 : LOAD64<"!global aext load" , global_aext_load>; defm PRIVATELOAD64 : LOAD64<"!private load" , private_load>; defm PRIVATEZEXTLOAD64 : LOAD64<"!private zext load" , private_zext_load>; defm PRIVATESEXTLOAD64 : LOAD64<"!private sext load" , private_sext_load>; defm PRIVATEAEXTLOAD64 : LOAD64<"!private aext load" , private_aext_load>; defm CPOOLLOAD64 : LOAD64<"!constant pool load" , cp_load>; defm CPOOLZEXTLOAD64 : LOAD64<"!constant pool zext load", cp_zext_load>; defm CPOOLSEXTLOAD64 : LOAD64<"!constant pool sext load", cp_sext_load>; defm CPOOLAEXTLOAD64 : LOAD64<"!constant aext pool load", cp_aext_load>; defm CONSTANTLOAD64 : LOAD64<"!constant load" , constant_load>; defm CONSTANTZEXTLOAD64 : LOAD64<"!constant zext load" , constant_zext_load>; defm CONSTANTSEXTLOAD64 : LOAD64<"!constant sext load" , constant_sext_load>; defm CONSTANTAEXTLOAD64 : LOAD64<"!constant aext load" , constant_aext_load>; defm LOCALLOAD64 : LOAD64<"!local load" , local_load>; defm LOCALZEXTLOAD64 : LOAD64<"!local zext load" , local_zext_load>; defm LOCALSEXTLOAD64 : LOAD64<"!local sext load" , local_sext_load>; defm LOCALAEXTLOAD64 : LOAD64<"!local aext load" , local_aext_load>; defm REGIONLOAD64 : LOAD64<"!region load" , region_load>; defm REGIONZEXTLOAD64 : LOAD64<"!region zext load" , region_zext_load>; defm REGIONSEXTLOAD64 : LOAD64<"!region sext load" , region_sext_load>; defm REGIONAEXTLOAD64 : LOAD64<"!region aext load" , region_aext_load>; } //===---------------------------------------------------------------------===// // IO Expansion Load/Store Instructions //===---------------------------------------------------------------------===// let mayLoad = 1 in { // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHLOAD64 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def CBLOAD64 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSLOAD64 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSLOAD64_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSLOAD64_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSLOAD64_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOADVEC64 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOADVEC64_v2i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOADVEC64_v4i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD64 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD64_i8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD64_u8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD64_i16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD64_u16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD64_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD64_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSLOAD64_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD64_i8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD64_i16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD64_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD64_Y_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD64_Z_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENALOAD64_W_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOAD64_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOAD64_v2i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOAD64_v4i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOADCACHED64_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOADCACHED64_v2i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWLOADCACHED64_v4i32 : TwoInOneOut; } let mayStore = 1 in { // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE64 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE64_X : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE64_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE64_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE64_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE64_XY : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def SCRATCHSTORE64_ZW : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSSTORE64 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSSTORE64_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSSTORE64_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def GDSSTORE64_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTOREVEC64 : ThreeInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTOREVEC64_v2i32 : ThreeInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTOREVEC64_v4i32 : ThreeInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE64 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE64_i8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE64_i16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE64_Y : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE64_Z : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def LDSSTORE64_W : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE64_i8 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE64_i16 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE64_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE64_Y_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE64_Z_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVARENASTORE64_W_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWSTORE64_i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWSTORE64_v2i32 : TwoInOneOut; // This opcode has custom swizzle patterns for some of the arguments. def UAVRAWSTORE64_v4i32 : TwoInOneOut; } } //===---------------------------------------------------------------------===// // Custom Inserter for Branches and returns, this eventually will be a // seperate pass //===---------------------------------------------------------------------===// let isTerminator = 1 in { def BRANCH : ILFormat; defm BRANCH_COND : BranchConditional; } //===---------------------------------------------------------------------===// // return instructions //===---------------------------------------------------------------------===// let isTerminator = 1, isReturn = 1, isBarrier = 1, hasCtrlDep = 1 in { def RETURN : ILFormat; } //===---------------------------------------------------------------------===// // Lower and raise the stack x amount //===---------------------------------------------------------------------===// def ADJCALLSTACKDOWN : ILFormat; def ADJCALLSTACKUP : ILFormat; //===---------------------------------------------------------------------===// // Handle a function call //===---------------------------------------------------------------------===// let isCall = 1, Defs = [ R110, R111, R112, R113, R114, R115, R116, R117, R118, R119, R120, R121, R122, R123, R124, R125, R126, R127, R128, R129, R130, R131, R132, R133, R134, R135, R136, R137, R138, R139, R140, R141, R142, R143, R144, R145, R146, R147, R148, R149, R150, R151, R152, R153, R154, R155, R156, R157, R158, R159, R160, R161, R162, R163, R164, R165, R166, R167, R168, R169, R170, R171, R172, R173, R174, R175, R176, R177, R178, R179, R180, R181, R182, R183, R184, R185, R186, R187, R188, R189, R190, R191, R192, R193, R194, R195, R196, R197, R198, R199, R200, R201, R202, R203, R204, R205, R206, R207, R208, R209, R210, R211, R212, R213, R214, R215, R216, R217, R218, R219, R220, R221, R222, R223, R224, R225, R226, R227, R228, R229, R230, R231, R232, R233, R234, R235, R236, R237, R238, R239, R240, R241, R242, R243, R244, R245, R246, R247, R248, R249, R250, R251, R252, R253, R254, R255 ] , Uses = [ R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, R40, R41, R42, R43, R44, R45, R46, R47, R48, R49, R50, R51, R52, R53, R54, R55, R56, R57, R58, R59, R60, R61, R62, R63, R64, R65, R66, R67, R68, R69, R70, R71, R72, R73, R74, R75, R76, R77, R78, R79, R80, R81, R82, R83, R84, R85, R86, R87, R88, R89, R90, R91, R92, R93, R94, R95, R96, R97, R98, R99, R100, R101, R102, R103, R104, R105, R106, R107, R108, R109 ] in { def CALL : UnaryOpNoRet; } //===---------------------------------------------------------------------===// // Flow and Program control Instructions //===---------------------------------------------------------------------===// let isTerminator=1 in { def SWITCH : ILFormat; def CASE : ILFormat; def BREAK : ILFormat; def CONTINUE : ILFormat; def DEFAULT : ILFormat; def ELSE : ILFormat; def ENDSWITCH : ILFormat; def ENDMAIN : ILFormat; def END : ILFormat; def ENDFUNC : ILFormat; def ENDIF : ILFormat; def WHILELOOP : ILFormat; def ENDLOOP : ILFormat; def FUNC : ILFormat; def RETDYN : ILFormat; // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm IF_LOGICALNZ : BranchInstr; // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm IF_LOGICALZ : BranchInstr; // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm BREAK_LOGICALNZ : BranchInstr; // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm BREAK_LOGICALZ : BranchInstr; // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm CONTINUE_LOGICALNZ : BranchInstr; // This opcode has custom swizzle pattern encoded in Swizzle Encoder defm CONTINUE_LOGICALZ : BranchInstr; defm IFC : BranchInstr2; defm BREAKC : BranchInstr2; defm CONTINUEC : BranchInstr2; } let isTerminator = 1, isBarrier = 1, hasCtrlDep = 1 in { def TRAP : ILFormat; } //===---------------------------------------------------------------------===// //----------------- Work Item Functions - OpenCL 6.11.1 ---------------------// //===---------------------------------------------------------------------===// let isCall = 1, isAsCheapAsAMove = 1 in { def GET_WORK_DIM : ILFormat; def GET_GLOBAL_ID : ILFormat; def GET_LOCAL_ID : ILFormat; def GET_GROUP_ID : ILFormat; def GET_GLOBAL_SIZE : ILFormat; def GET_LOCAL_SIZE : ILFormat; def GET_NUM_GROUPS : ILFormat; def GET_GLOBAL_OFFSET : ILFormat; let Predicates = [Has64BitPtr] in { def GET_PRINTF_OFFSET_i64: ILFormat; def GET_PRINTF_SIZE_i64 : ILFormat; } let Predicates = [Has32BitPtr] in { def GET_PRINTF_OFFSET_i32 : ILFormat; def GET_PRINTF_SIZE_i32 : ILFormat; } } //===---------------------------------------------------------------------===// //------------- Synchronization Functions - OpenCL 6.11.9 -------------------// //===---------------------------------------------------------------------===// let isCall=1 in { def FENCE : BinaryOpNoRet; def FENCE_LOCAL : BinaryOpNoRet; def FENCE_GLOBAL : BinaryOpNoRet; def FENCE_REGION : BinaryOpNoRet; def FENCE_READ_ONLY : BinaryOpNoRet; def FENCE_READ_ONLY_LOCAL : BinaryOpNoRet; def FENCE_READ_ONLY_GLOBAL : BinaryOpNoRet; def FENCE_READ_ONLY_REGION : BinaryOpNoRet; def FENCE_WRITE_ONLY : BinaryOpNoRet; def FENCE_WRITE_ONLY_LOCAL : BinaryOpNoRet; def FENCE_WRITE_ONLY_GLOBAL : BinaryOpNoRet; def FENCE_WRITE_ONLY_REGION : BinaryOpNoRet; } let isReturn = 1 in { def EARLY_EXIT : UnaryOpNoRet; } def MEDIA_UNPACK_0 : OneInOneOut; def MEDIA_UNPACK_1 : OneInOneOut; def MEDIA_UNPACK_2 : OneInOneOut; def MEDIA_UNPACK_3 : OneInOneOut; let Predicates = [Has32BitPtr] in { // All of the image functions def IMAGE1D_READ : ILFormat; def IMAGE1DA_READ : ILFormat; def IMAGE2D_READ : ILFormat; def IMAGE2DA_READ : ILFormat; def IMAGE3D_READ : ILFormat; def IMAGE1D_READ_UNNORM : ILFormat; def IMAGE1DA_READ_UNNORM : ILFormat; def IMAGE2D_READ_UNNORM : ILFormat; def IMAGE2DA_READ_UNNORM : ILFormat; def IMAGE3D_READ_UNNORM : ILFormat; def IMAGE1D_INFO0 : ILFormat; def IMAGE1D_INFO1 : ILFormat; def IMAGE1DA_INFO0 : ILFormat; def IMAGE1DA_INFO1 : ILFormat; def IMAGE2D_INFO0 : ILFormat; def IMAGE2D_INFO1 : ILFormat; def IMAGE2DA_INFO0 : ILFormat; def IMAGE2DA_INFO1 : ILFormat; def IMAGE3D_INFO0 : ILFormat; def IMAGE3D_INFO1 : ILFormat; def IMAGE1D_WRITE : ILFormat; def IMAGE1DA_WRITE : ILFormat; def IMAGE2D_WRITE : ILFormat; def IMAGE2DA_WRITE : ILFormat; def IMAGE3D_WRITE : ILFormat; let hasSideEffects = 1, isNotDuplicable = 1 in { // All of the noret atomic functions def ATOM_G_ADD_NORET : BinAtomNoRet; def ATOM_G_AND_NORET : BinAtomNoRet; def ATOM_G_MAX_NORET : BinAtomNoRet; def ATOM_G_MIN_NORET : BinAtomNoRet; def ATOM_G_UMAX_NORET : BinAtomNoRet; def ATOM_G_UMIN_NORET : BinAtomNoRet; def ATOM_G_OR_NORET : BinAtomNoRet; def ATOM_G_RSUB_NORET : BinAtomNoRet; def ATOM_G_SUB_NORET : BinAtomNoRet; def ATOM_G_XOR_NORET : BinAtomNoRet; def ATOM_G_INC_NORET : BinAtomNoRet; def ATOM_G_DEC_NORET : BinAtomNoRet; def ATOM_G_CMPXCHG_NORET : CmpXChgNoRet; def ATOM_A_ADD_NORET : BinAtomNoRet; def ATOM_A_AND_NORET : BinAtomNoRet; def ATOM_A_MAX_NORET : BinAtomNoRet; def ATOM_A_MIN_NORET : BinAtomNoRet; def ATOM_A_UMAX_NORET : BinAtomNoRet; def ATOM_A_UMIN_NORET : BinAtomNoRet; def ATOM_A_OR_NORET : BinAtomNoRet; def ATOM_A_RSUB_NORET : BinAtomNoRet; def ATOM_A_SUB_NORET : BinAtomNoRet; def ATOM_A_XOR_NORET : BinAtomNoRet; def ATOM_A_INC_NORET : BinAtomNoRet; def ATOM_A_DEC_NORET : BinAtomNoRet; def ATOM_A_CMPXCHG_NORET : CmpXChgNoRet; def ATOM_L_ADD_NORET : BinAtomNoRet; def ATOM_L_AND_NORET : BinAtomNoRet; def ATOM_L_MAX_NORET : BinAtomNoRet; def ATOM_L_MIN_NORET : BinAtomNoRet; def ATOM_L_UMAX_NORET : BinAtomNoRet; def ATOM_L_UMIN_NORET : BinAtomNoRet; def ATOM_L_MSKOR_NORET : TriAtomNoRet; def ATOM_L_OR_NORET : BinAtomNoRet; def ATOM_L_RSUB_NORET : BinAtomNoRet; def ATOM_L_SUB_NORET : BinAtomNoRet; def ATOM_L_XOR_NORET : BinAtomNoRet; def ATOM_L_INC_NORET : BinAtomNoRet; def ATOM_L_DEC_NORET : BinAtomNoRet; def ATOM_L_CMPXCHG_NORET : TriAtomNoRet; def ATOM_R_ADD_NORET : BinAtomNoRet; def ATOM_R_AND_NORET : BinAtomNoRet; def ATOM_R_MAX_NORET : BinAtomNoRet; def ATOM_R_MIN_NORET : BinAtomNoRet; def ATOM_R_UMAX_NORET : BinAtomNoRet; def ATOM_R_UMIN_NORET : BinAtomNoRet; def ATOM_R_MSKOR_NORET : TriAtomNoRet; def ATOM_R_OR_NORET : BinAtomNoRet; def ATOM_R_RSUB_NORET : BinAtomNoRet; def ATOM_R_SUB_NORET : BinAtomNoRet; def ATOM_R_XOR_NORET : BinAtomNoRet; def ATOM_R_INC_NORET : BinAtomNoRet; def ATOM_R_DEC_NORET : BinAtomNoRet; def ATOM_R_CMPXCHG_NORET : CmpXChgNoRet; def APPEND_ALLOC_NORET : AppendNoRet; def APPEND_CONSUME_NORET : AppendNoRet; // All of the atomic functions that return def ATOM_G_ADD : BinAtom; def ATOM_G_AND : BinAtom; def ATOM_G_MAX : BinAtom; def ATOM_G_MIN : BinAtom; def ATOM_G_UMAX : BinAtom; def ATOM_G_UMIN : BinAtom; def ATOM_G_OR : BinAtom; def ATOM_G_RSUB : BinAtom; def ATOM_G_SUB : BinAtom; def ATOM_G_XOR : BinAtom; def ATOM_G_INC : BinAtom; def ATOM_G_DEC : BinAtom; def ATOM_G_XCHG : BinAtom; def ATOM_G_CMPXCHG : CmpXChg; // Arena atomic accesses def ATOM_A_ADD : BinAtom; def ATOM_A_AND : BinAtom; def ATOM_A_MAX : BinAtom; def ATOM_A_MIN : BinAtom; def ATOM_A_UMAX : BinAtom; def ATOM_A_UMIN : BinAtom; def ATOM_A_OR : BinAtom; def ATOM_A_RSUB : BinAtom; def ATOM_A_SUB : BinAtom; def ATOM_A_XOR : BinAtom; def ATOM_A_INC : BinAtom; def ATOM_A_DEC : BinAtom; def ATOM_A_XCHG : BinAtom; def ATOM_A_CMPXCHG : CmpXChg; def ATOM_L_ADD : BinAtom; def ATOM_L_AND : BinAtom; def ATOM_L_MAX : BinAtom; def ATOM_L_MIN : BinAtom; def ATOM_L_UMAX : BinAtom; def ATOM_L_UMIN : BinAtom; def ATOM_L_OR : BinAtom; def ATOM_L_MSKOR : TriAtom; def ATOM_L_RSUB : BinAtom; def ATOM_L_SUB : BinAtom; def ATOM_L_XOR : BinAtom; def ATOM_L_INC : BinAtom; def ATOM_L_DEC : BinAtom; def ATOM_L_XCHG : BinAtom; def ATOM_L_CMPXCHG : TriAtom; def ATOM_R_ADD : BinAtom; def ATOM_R_AND : BinAtom; def ATOM_R_MAX : BinAtom; def ATOM_R_MIN : BinAtom; def ATOM_R_UMAX : BinAtom; def ATOM_R_UMIN : BinAtom; def ATOM_R_OR : BinAtom; def ATOM_R_MSKOR : TriAtom; def ATOM_R_RSUB : BinAtom; def ATOM_R_SUB : BinAtom; def ATOM_R_XOR : BinAtom; def ATOM_R_INC : BinAtom; def ATOM_R_DEC : BinAtom; def ATOM_R_XCHG : BinAtom; def ATOM_R_CMPXCHG : CmpXChg; def APPEND_ALLOC : Append; def APPEND_CONSUME : Append; } } let Predicates = [Has64BitPtr] in { // All of the image functions def IMAGE1D64_READ : ILFormat; def IMAGE1DA64_READ : ILFormat; def IMAGE2D64_READ : ILFormat; def IMAGE2DA64_READ : ILFormat; def IMAGE3D64_READ : ILFormat; def IMAGE1D64_READ_UNNORM : ILFormat; def IMAGE1DA64_READ_UNNORM : ILFormat; def IMAGE2D64_READ_UNNORM : ILFormat; def IMAGE2DA64_READ_UNNORM : ILFormat; def IMAGE3D64_READ_UNNORM : ILFormat; def IMAGE1D64_INFO0 : ILFormat; def IMAGE1D64_INFO1 : ILFormat; def IMAGE1DA64_INFO0 : ILFormat; def IMAGE1DA64_INFO1 : ILFormat; def IMAGE2DA64_INFO0 : ILFormat; def IMAGE2DA64_INFO1 : ILFormat; def IMAGE2D64_INFO0 : ILFormat; def IMAGE2D64_INFO1 : ILFormat; def IMAGE3D64_INFO0 : ILFormat; def IMAGE3D64_INFO1 : ILFormat; def IMAGE1D64_WRITE : ILFormat; def IMAGE1DA64_WRITE : ILFormat; def IMAGE2D64_WRITE : ILFormat; def IMAGE2DA64_WRITE : ILFormat; def IMAGE3D64_WRITE : ILFormat; let hasSideEffects= 1 in { // All of the noret atomic functions def ATOM_G64_ADD_NORET : BinAtomNoRet64; def ATOM_G64_AND_NORET : BinAtomNoRet64; def ATOM_G64_MAX_NORET : BinAtomNoRet64; def ATOM_G64_MIN_NORET : BinAtomNoRet64; def ATOM_G64_UMAX_NORET : BinAtomNoRet64; def ATOM_G64_UMIN_NORET : BinAtomNoRet64; def ATOM_G64_OR_NORET : BinAtomNoRet64; def ATOM_G64_RSUB_NORET : BinAtomNoRet64; def ATOM_G64_SUB_NORET : BinAtomNoRet64; def ATOM_G64_XOR_NORET : BinAtomNoRet64; def ATOM_G64_INC_NORET : BinAtomNoRet64; def ATOM_G64_DEC_NORET : BinAtomNoRet64; def ATOM_G64_CMPXCHG_NORET : CmpXChgNoRet64; def ATOM_A64_ADD_NORET : BinAtomNoRet64; def ATOM_A64_AND_NORET : BinAtomNoRet64; def ATOM_A64_MAX_NORET : BinAtomNoRet64; def ATOM_A64_MIN_NORET : BinAtomNoRet64; def ATOM_A64_UMAX_NORET : BinAtomNoRet64; def ATOM_A64_UMIN_NORET : BinAtomNoRet64; def ATOM_A64_OR_NORET : BinAtomNoRet64; def ATOM_A64_RSUB_NORET : BinAtomNoRet64; def ATOM_A64_SUB_NORET : BinAtomNoRet64; def ATOM_A64_XOR_NORET : BinAtomNoRet64; def ATOM_A64_INC_NORET : BinAtomNoRet64; def ATOM_A64_DEC_NORET : BinAtomNoRet64; def ATOM_A64_CMPXCHG_NORET : CmpXChgNoRet64; def ATOM_L64_ADD_NORET : BinAtomNoRet64; def ATOM_L64_AND_NORET : BinAtomNoRet64; def ATOM_L64_MAX_NORET : BinAtomNoRet64; def ATOM_L64_MIN_NORET : BinAtomNoRet64; def ATOM_L64_UMAX_NORET : BinAtomNoRet64; def ATOM_L64_UMIN_NORET : BinAtomNoRet64; def ATOM_L64_MSKOR_NORET : TriAtomNoRet64; def ATOM_L64_OR_NORET : BinAtomNoRet64; def ATOM_L64_RSUB_NORET : BinAtomNoRet64; def ATOM_L64_SUB_NORET : BinAtomNoRet64; def ATOM_L64_XOR_NORET : BinAtomNoRet64; def ATOM_L64_INC_NORET : BinAtomNoRet64; def ATOM_L64_DEC_NORET : BinAtomNoRet64; def ATOM_L64_CMPXCHG_NORET : TriAtomNoRet64; def ATOM_R64_ADD_NORET : BinAtomNoRet64; def ATOM_R64_AND_NORET : BinAtomNoRet64; def ATOM_R64_MAX_NORET : BinAtomNoRet64; def ATOM_R64_MIN_NORET : BinAtomNoRet64; def ATOM_R64_UMAX_NORET : BinAtomNoRet64; def ATOM_R64_UMIN_NORET : BinAtomNoRet64; def ATOM_R64_MSKOR_NORET : TriAtomNoRet64; def ATOM_R64_OR_NORET : BinAtomNoRet64; def ATOM_R64_RSUB_NORET : BinAtomNoRet64; def ATOM_R64_SUB_NORET : BinAtomNoRet64; def ATOM_R64_XOR_NORET : BinAtomNoRet64; def ATOM_R64_INC_NORET : BinAtomNoRet64; def ATOM_R64_DEC_NORET : BinAtomNoRet64; def ATOM_R64_CMPXCHG_NORET : CmpXChgNoRet64; def APPEND_ALLOC64_NORET : AppendNoRet64; def APPEND_CONSUME64_NORET : AppendNoRet64; // All of the atomic functions that return def ATOM_G64_ADD : BinAtom64; def ATOM_G64_AND : BinAtom64; def ATOM_G64_MAX : BinAtom64; def ATOM_G64_MIN : BinAtom64; def ATOM_G64_UMAX : BinAtom64; def ATOM_G64_UMIN : BinAtom64; def ATOM_G64_OR : BinAtom64; def ATOM_G64_RSUB : BinAtom64; def ATOM_G64_SUB : BinAtom64; def ATOM_G64_XOR : BinAtom64; def ATOM_G64_INC : BinAtom64; def ATOM_G64_DEC : BinAtom64; def ATOM_G64_XCHG : BinAtom64; def ATOM_G64_CMPXCHG : CmpXChg64; // Arena atomic accesses def ATOM_A64_ADD : BinAtom64; def ATOM_A64_AND : BinAtom64; def ATOM_A64_MAX : BinAtom64; def ATOM_A64_MIN : BinAtom64; def ATOM_A64_UMAX : BinAtom64; def ATOM_A64_UMIN : BinAtom64; def ATOM_A64_OR : BinAtom64; def ATOM_A64_RSUB : BinAtom64; def ATOM_A64_SUB : BinAtom64; def ATOM_A64_XOR : BinAtom64; def ATOM_A64_INC : BinAtom64; def ATOM_A64_DEC : BinAtom64; def ATOM_A64_XCHG : BinAtom64; def ATOM_A64_CMPXCHG : CmpXChg64; def ATOM_L64_ADD : BinAtom64; def ATOM_L64_AND : BinAtom64; def ATOM_L64_MAX : BinAtom64; def ATOM_L64_MIN : BinAtom64; def ATOM_L64_UMAX : BinAtom64; def ATOM_L64_UMIN : BinAtom64; def ATOM_L64_OR : BinAtom64; def ATOM_L64_MSKOR : TriAtom64; def ATOM_L64_RSUB : BinAtom64; def ATOM_L64_SUB : BinAtom64; def ATOM_L64_XOR : BinAtom64; def ATOM_L64_INC : BinAtom64; def ATOM_L64_DEC : BinAtom64; def ATOM_L64_XCHG : BinAtom64; def ATOM_L64_CMPXCHG : TriAtom64; def ATOM_R64_ADD : BinAtom64; def ATOM_R64_AND : BinAtom64; def ATOM_R64_MAX : BinAtom64; def ATOM_R64_MIN : BinAtom64; def ATOM_R64_UMAX : BinAtom64; def ATOM_R64_UMIN : BinAtom64; def ATOM_R64_OR : BinAtom64; def ATOM_R64_MSKOR : TriAtom64; def ATOM_R64_RSUB : BinAtom64; def ATOM_R64_SUB : BinAtom64; def ATOM_R64_XOR : BinAtom64; def ATOM_R64_INC : BinAtom64; def ATOM_R64_DEC : BinAtom64; def ATOM_R64_XCHG : BinAtom64; def ATOM_R64_CMPXCHG : CmpXChg64; def APPEND_ALLOC64 : Append64; def APPEND_CONSUME64 : Append64; } } /* def SEMAPHORE_INIT : BinaryOpNoRet; def SEMAPHORE_WAIT : UnaryOpNoRet; def SEMAPHORE_SIGNAL : UnaryOpNoRet; */