Index: lib/Target/R600/SIDefines.h =================================================================== --- lib/Target/R600/SIDefines.h +++ lib/Target/R600/SIDefines.h @@ -12,6 +12,7 @@ #define SIDEFINES_H_ namespace SIInstrFlags { +// This needs to be kept in sync with the field bits in InstSI. enum { MIMG = 1 << 3, SMRD = 1 << 4, @@ -19,7 +20,9 @@ VOP2 = 1 << 6, VOP3 = 1 << 7, VOPC = 1 << 8, - SALU = 1 << 9 + SALU = 1 << 9, + MUBUF = 1 << 10, + MTBUF = 1 << 11 }; } Index: lib/Target/R600/SIInstrFormats.td =================================================================== --- lib/Target/R600/SIInstrFormats.td +++ lib/Target/R600/SIInstrFormats.td @@ -24,7 +24,10 @@ field bits<1> VOP3 = 0; field bits<1> VOPC = 0; field bits<1> SALU = 0; + field bits<1> MUBUF = 0; + field bits<1> MTBUF = 0; + // These need to be kept in sync with the enum in SIInstrFlags. let TSFlags{0} = VM_CNT; let TSFlags{1} = EXP_CNT; let TSFlags{2} = LGKM_CNT; @@ -35,6 +38,8 @@ let TSFlags{7} = VOP3; let TSFlags{8} = VOPC; let TSFlags{9} = SALU; + let TSFlags{10} = MUBUF; + let TSFlags{11} = MTBUF; } class Enc32 { @@ -503,6 +508,7 @@ let VM_CNT = 1; let EXP_CNT = 1; + let MUBUF = 1; let neverHasSideEffects = 1; let UseNamedOperandTable = 1; @@ -513,6 +519,7 @@ let VM_CNT = 1; let EXP_CNT = 1; + let MTBUF = 1; let neverHasSideEffects = 1; } Index: lib/Target/R600/SIInstrInfo.h =================================================================== --- lib/Target/R600/SIInstrInfo.h +++ lib/Target/R600/SIInstrInfo.h @@ -109,6 +109,8 @@ bool isDS(uint16_t Opcode) const LLVM_READONLY; bool isMIMG(uint16_t Opcode) const LLVM_READONLY; bool isSMRD(uint16_t Opcode) const LLVM_READONLY; + bool isMUBUF(uint16_t Opcode) const LLVM_READONLY; + bool isMTBUF(uint16_t Opcode) const LLVM_READONLY; bool isVOP1(uint16_t Opcode) const LLVM_READONLY; bool isVOP2(uint16_t Opcode) const LLVM_READONLY; bool isVOP3(uint16_t Opcode) const LLVM_READONLY; Index: lib/Target/R600/SIInstrInfo.cpp =================================================================== --- lib/Target/R600/SIInstrInfo.cpp +++ lib/Target/R600/SIInstrInfo.cpp @@ -557,6 +557,14 @@ return get(Opcode).TSFlags & SIInstrFlags::SMRD; } +bool SIInstrInfo::isMUBUF(uint16_t Opcode) const { + return get(Opcode).TSFlags & SIInstrFlags::MUBUF; +} + +bool SIInstrInfo::isMTBUF(uint16_t Opcode) const { + return get(Opcode).TSFlags & SIInstrFlags::MTBUF; +} + bool SIInstrInfo::isVOP1(uint16_t Opcode) const { return get(Opcode).TSFlags & SIInstrFlags::VOP1; }