mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
R600/SI: Do abs/neg folding with ComplexPatterns
Abs/neg folding has moved out of foldOperands and into the instruction selection phase using complex patterns. As a consequence of this change, we now prefer to select the 64-bit encoding for most instructions and the modifier operands have been dropped from integer VOP3 instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214467 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "SIDefines.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "MCTargetDesc/AMDGPUMCCodeEmitter.h"
|
||||
#include "MCTargetDesc/AMDGPUFixupKinds.h"
|
||||
@@ -84,6 +85,15 @@ MCCodeEmitter *llvm::createSIMCCodeEmitter(const MCInstrInfo &MCII,
|
||||
|
||||
bool SIMCCodeEmitter::isSrcOperand(const MCInstrDesc &Desc,
|
||||
unsigned OpNo) const {
|
||||
// FIXME: We need a better way to figure out which operands can be immediate
|
||||
// values
|
||||
//
|
||||
// Some VOP* instructions like ADDC use VReg32 as the register class
|
||||
// for source 0, because they read VCC and can't take an SGPR as an
|
||||
// argument due to constant bus restrictions.
|
||||
if (OpNo == 1 && (Desc.TSFlags & (SIInstrFlags::VOP1 | SIInstrFlags::VOP2 |
|
||||
SIInstrFlags::VOPC)))
|
||||
return true;
|
||||
|
||||
unsigned RegClass = Desc.OpInfo[OpNo].RegClass;
|
||||
return (AMDGPU::SSrc_32RegClassID == RegClass) ||
|
||||
|
||||
Reference in New Issue
Block a user