[AMDGPU] Remove trivially true predicates from GCNSubtarget. NFC. (#172830)

This commit is contained in:
Jay Foad 2025-12-18 11:05:34 +00:00 committed by GitHub
parent f4e941b209
commit 35c2dbd481
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 45 deletions

View File

@ -454,30 +454,6 @@ public:
return getGeneration() == SOUTHERN_ISLANDS;
}
bool hasBFE() const {
return true;
}
bool hasBFI() const {
return true;
}
bool hasBFM() const {
return hasBFE();
}
bool hasBCNT(unsigned Size) const {
return true;
}
bool hasFFBL() const {
return true;
}
bool hasFFBH() const {
return true;
}
bool hasMed3_16() const {
return getGeneration() >= AMDGPUSubtarget::GFX9;
}
@ -492,10 +468,6 @@ public:
bool hasFmaMixBF16Insts() const { return HasFmaMixBF16Insts; }
bool hasCARRY() const {
return true;
}
bool hasFMA() const {
return FMA;
}

View File

@ -512,21 +512,8 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
if (Subtarget->hasMadMacF32Insts())
setOperationAction(ISD::FMAD, MVT::f32, Legal);
if (!Subtarget->hasBFI())
// fcopysign can be done in a single instruction with BFI.
setOperationAction(ISD::FCOPYSIGN, {MVT::f32, MVT::f64}, Expand);
if (!Subtarget->hasBCNT(32))
setOperationAction(ISD::CTPOP, MVT::i32, Expand);
if (!Subtarget->hasBCNT(64))
setOperationAction(ISD::CTPOP, MVT::i64, Expand);
if (Subtarget->hasFFBH())
setOperationAction({ISD::CTLZ, ISD::CTLZ_ZERO_UNDEF}, MVT::i32, Custom);
if (Subtarget->hasFFBL())
setOperationAction({ISD::CTTZ, ISD::CTTZ_ZERO_UNDEF}, MVT::i32, Custom);
setOperationAction({ISD::CTLZ, ISD::CTLZ_ZERO_UNDEF}, MVT::i32, Custom);
setOperationAction({ISD::CTTZ, ISD::CTTZ_ZERO_UNDEF}, MVT::i32, Custom);
// We only really have 32-bit BFE instructions (and 16-bit on VI).
//
@ -536,8 +523,7 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
// have some pass reduce 64-bit extracts to 32-bit if possible. Extracts that
// span the midpoint are probably relatively rare, so don't worry about them
// for now.
if (Subtarget->hasBFE())
setHasExtractBitsInsn(true);
setHasExtractBitsInsn(true);
// Clamp modifier on add/sub
if (Subtarget->hasIntClamp())