mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
AMDGPU: Make S_DENORM_MODE not be a scheduling boundary
Now that the mode register uses/defs should be properly modeled, we don't need to treat the FP mode switch as an arbitrary side effect.
This commit is contained in:
parent
5b2222b080
commit
8d88eb100a
@ -2944,10 +2944,12 @@ bool SIInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
|
||||
// Target-independent instructions do not have an implicit-use of EXEC, even
|
||||
// when they operate on VGPRs. Treating EXEC modifications as scheduling
|
||||
// boundaries prevents incorrect movements of such instructions.
|
||||
|
||||
// TODO: Don't treat setreg with known constant that only changes MODE as
|
||||
// barrier.
|
||||
return MI.modifiesRegister(AMDGPU::EXEC, &RI) ||
|
||||
MI.getOpcode() == AMDGPU::S_SETREG_IMM32_B32 ||
|
||||
MI.getOpcode() == AMDGPU::S_SETREG_B32 ||
|
||||
MI.getOpcode() == AMDGPU::S_DENORM_MODE ||
|
||||
changesVGPRIndexingMode(MI);
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ def SIload_d16_hi_i8 : SDNode<"AMDGPUISD::LOAD_D16_HI_I8",
|
||||
|
||||
def SIdenorm_mode : SDNode<"AMDGPUISD::DENORM_MODE",
|
||||
SDTypeProfile<0 ,1, [SDTCisInt<0>]>,
|
||||
[SDNPHasChain, SDNPSideEffect, SDNPOptInGlue, SDNPOutGlue]
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]
|
||||
>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -1218,8 +1218,7 @@ let SubtargetPredicate = isGFX10Plus in {
|
||||
def S_WAITCNT_DEPCTR :
|
||||
SOPP <0x023, (ins s16imm:$simm16), "s_waitcnt_depctr $simm16">;
|
||||
|
||||
let hasSideEffects = 1, Uses = [MODE], Defs = [MODE] in {
|
||||
// FIXME: Should remove hasSideEffects
|
||||
let hasSideEffects = 0, Uses = [MODE], Defs = [MODE] in {
|
||||
def S_ROUND_MODE :
|
||||
SOPP<0x024, (ins s16imm:$simm16), "s_round_mode $simm16">;
|
||||
def S_DENORM_MODE :
|
||||
|
Loading…
x
Reference in New Issue
Block a user