1
0
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:
Matt Arsenault 2020-05-27 14:48:14 -04:00
parent 5b2222b080
commit 8d88eb100a
3 changed files with 5 additions and 4 deletions

View File

@ -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);
}

View File

@ -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]
>;
//===----------------------------------------------------------------------===//

View File

@ -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 :