Skip to content

Commit e75dde7

Browse files
committed
[AMDGPU] Move to SIISelLowering.
1 parent b873ad2 commit e75dde7

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6043,11 +6043,3 @@ bool AMDGPUTargetLowering::isReassocProfitable(MachineRegisterInfo &MRI,
60436043
Register N0, Register N1) const {
60446044
return MRI.hasOneNonDBGUse(N0); // FIXME: handle regbanks
60456045
}
6046-
6047-
bool AMDGPUTargetLowering::hasAndNot(SDValue Op) const {
6048-
if (Op->isDivergent())
6049-
return false;
6050-
6051-
EVT VT = Op.getValueType();
6052-
return VT == MVT::i32 || VT == MVT::i64;
6053-
}

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,6 @@ class AMDGPUTargetLowering : public TargetLowering {
387387
MVT getFenceOperandTy(const DataLayout &DL) const override {
388388
return MVT::i32;
389389
}
390-
391-
/// Return true if the target supports a bitwise and-not operation:
392-
/// X = ~A & B
393-
/// This function checks if the operation can be directly mapped to the
394-
/// target's native instructions, potentially simplifying select or other
395-
/// related instructions by using more efficient hardware-specific operations.
396-
bool hasAndNot(SDValue Op) const override;
397390
};
398391

399392
namespace AMDGPUISD {

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16890,3 +16890,11 @@ SITargetLowering::lowerIdempotentRMWIntoFencedLoad(AtomicRMWInst *AI) const {
1689016890
AI->eraseFromParent();
1689116891
return LI;
1689216892
}
16893+
16894+
bool SITargetLowering::hasAndNot(SDValue Op) const {
16895+
if (Op->isDivergent())
16896+
return false;
16897+
16898+
EVT VT = Op.getValueType();
16899+
return VT == MVT::i32 || VT == MVT::i64;
16900+
}

llvm/lib/Target/AMDGPU/SIISelLowering.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,13 @@ class SITargetLowering final : public AMDGPUTargetLowering {
598598

599599
MachineMemOperand::Flags
600600
getTargetMMOFlags(const Instruction &I) const override;
601+
602+
/// Return true if the target supports a bitwise and-not operation:
603+
/// X = ~A & B
604+
/// This function checks if the operation can be directly mapped to the
605+
/// target's native instructions, potentially simplifying select or other
606+
/// related instructions by using more efficient hardware-specific operations.
607+
bool hasAndNot(SDValue Op) const override;
601608
};
602609

603610
// Returns true if argument is a boolean value which is not serialized into

0 commit comments

Comments
 (0)