From f81e4663a766e71e907886640327abea4a0d78e2 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 2 Jun 2012 09:51:04 -0400 Subject: radeon/llvm: Add isMov() to AMDILInstrInfo This enables the CFGStructurizer to work without the AMDIL::MOV* instructions. --- src/gallium/drivers/radeon/SIInstrInfo.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/gallium/drivers/radeon/SIInstrInfo.cpp') diff --git a/src/gallium/drivers/radeon/SIInstrInfo.cpp b/src/gallium/drivers/radeon/SIInstrInfo.cpp index 4c7a92075c6..058c772e620 100644 --- a/src/gallium/drivers/radeon/SIInstrInfo.cpp +++ b/src/gallium/drivers/radeon/SIInstrInfo.cpp @@ -115,3 +115,18 @@ MachineInstr * SIInstrInfo::getMovImmInstr(MachineFunction *MF, unsigned DstReg, return MI; } + +bool SIInstrInfo::isMov(unsigned Opcode) const +{ + switch(Opcode) { + default: return false; + case AMDIL::S_MOV_B32: + case AMDIL::S_MOV_B64: + case AMDIL::V_MOV_B32_e32: + case AMDIL::V_MOV_B32_e64: + case AMDIL::V_MOV_IMM_F32: + case AMDIL::V_MOV_IMM_I32: + case AMDIL::S_MOV_IMM_I32: + return true; + } +} -- cgit v1.2.3