@@ -716,35 +716,35 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
716
716
static bool isVGPRSpill (const MachineInstr &MI) {
717
717
return MI.getOpcode () != AMDGPU::SI_SPILL_S32_TO_VGPR &&
718
718
MI.getOpcode () != AMDGPU::SI_RESTORE_S32_FROM_VGPR &&
719
- ((MI.getDesc ().TSFlags & SIInstrFlags::Spill) &&
720
- (MI.getDesc ().TSFlags & SIInstrFlags::VALU));
719
+ (isSpill (MI) & isVALU (MI));
721
720
}
722
721
723
722
bool isVGPRSpill (uint16_t Opcode) const {
724
723
return Opcode != AMDGPU::SI_SPILL_S32_TO_VGPR &&
725
724
Opcode != AMDGPU::SI_RESTORE_S32_FROM_VGPR &&
726
- ((get (Opcode).TSFlags & SIInstrFlags::Spill) &&
727
- (get (Opcode).TSFlags & SIInstrFlags::VALU));
725
+ (isSpill (Opcode) & isVALU (Opcode));
728
726
}
729
727
730
728
static bool isSGPRSpill (const MachineInstr &MI) {
731
729
return MI.getOpcode () == AMDGPU::SI_SPILL_S32_TO_VGPR ||
732
730
MI.getOpcode () == AMDGPU::SI_RESTORE_S32_FROM_VGPR ||
733
- ((MI.getDesc ().TSFlags & SIInstrFlags::Spill) &&
734
- (MI.getDesc ().TSFlags & SIInstrFlags::SALU));
731
+ (isSpill (MI) & isSALU (MI));
735
732
}
736
733
737
734
bool isSGPRSpill (uint16_t Opcode) const {
738
735
return Opcode == AMDGPU::SI_SPILL_S32_TO_VGPR ||
739
736
Opcode == AMDGPU::SI_RESTORE_S32_FROM_VGPR ||
740
- ((get (Opcode).TSFlags & SIInstrFlags::Spill) &&
741
- (get (Opcode).TSFlags & SIInstrFlags::SALU));
737
+ (isSpill (Opcode) & isSALU (Opcode));
742
738
}
743
739
744
- bool isSpillOpcode (uint16_t Opcode) const {
740
+ bool isSpill (uint16_t Opcode) const {
745
741
return get (Opcode).TSFlags & SIInstrFlags::Spill;
746
742
}
747
743
744
+ static bool isSpill (const MachineInstr &MI) {
745
+ return MI.getDesc ().TSFlags & SIInstrFlags::Spill;
746
+ }
747
+
748
748
static bool isWWMRegSpillOpcode (uint16_t Opcode) {
749
749
return Opcode == AMDGPU::SI_SPILL_WWM_V32_SAVE ||
750
750
Opcode == AMDGPU::SI_SPILL_WWM_AV32_SAVE ||
0 commit comments