mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-03 14:21:30 +00:00
R600/SI: Merge tables for commuting
Don't use a separate table for compares anymore, and use the same VOP2_REV class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232992 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -426,29 +426,9 @@ SIInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned commuteCompareOpcode(unsigned Opcode) {
|
||||
// Compares have arbitrarily selected that < is the "original" and > is the
|
||||
// "reverse"
|
||||
|
||||
int NewOpc;
|
||||
|
||||
NewOpc = AMDGPU::getCommuteCmpRev(Opcode);
|
||||
if (NewOpc != -1)
|
||||
return NewOpc;
|
||||
|
||||
NewOpc = AMDGPU::getCommuteCmpOrig(Opcode);
|
||||
if (NewOpc != -1)
|
||||
return NewOpc;
|
||||
|
||||
return Opcode;
|
||||
}
|
||||
|
||||
unsigned SIInstrInfo::commuteOpcode(const MachineInstr &MI) const {
|
||||
const unsigned Opcode = MI.getOpcode();
|
||||
|
||||
if (MI.isCompare())
|
||||
return commuteCompareOpcode(Opcode);
|
||||
|
||||
int NewOpc;
|
||||
|
||||
// Try to map original to commuted opcode
|
||||
|
||||
Reference in New Issue
Block a user