Skip to content

Commit be2b8f6

Browse files
kosarevmariusz-sikora-at-amd
authored andcommitted
[AMDGPU][NFC] Update name for BVH Intersect Ray
1 parent 8e0a63d commit be2b8f6

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3567,7 +3567,8 @@ bool AMDGPUInstructionSelector::selectGlobalLoadLds(MachineInstr &MI) const{
35673567
return constrainSelectedInstRegOperands(*MIB, TII, TRI, RBI);
35683568
}
35693569

3570-
bool AMDGPUInstructionSelector::selectBVHIntrinsic(MachineInstr &MI) const{
3570+
bool AMDGPUInstructionSelector::selectBVHIntersectRayIntrinsic(
3571+
MachineInstr &MI) const {
35713572
MI.setDesc(TII.get(MI.getOperand(1).getImm()));
35723573
MI.removeOperand(1);
35733574
MI.addImplicitDefUseOperands(*MI.getParent()->getParent());
@@ -4085,8 +4086,8 @@ bool AMDGPUInstructionSelector::select(MachineInstr &I) {
40854086
assert(Intr && "not an image intrinsic with image pseudo");
40864087
return selectImageIntrinsic(I, Intr);
40874088
}
4088-
case AMDGPU::G_AMDGPU_INTRIN_BVH_INTERSECT_RAY:
4089-
return selectBVHIntrinsic(I);
4089+
case AMDGPU::G_AMDGPU_BVH_INTERSECT_RAY:
4090+
return selectBVHIntersectRayIntrinsic(I);
40904091
case AMDGPU::G_SBFX:
40914092
case AMDGPU::G_UBFX:
40924093
return selectG_SBFX_UBFX(I);

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class AMDGPUInstructionSelector final : public InstructionSelector {
146146
bool selectG_INSERT_VECTOR_ELT(MachineInstr &I) const;
147147
bool selectBufferLoadLds(MachineInstr &MI) const;
148148
bool selectGlobalLoadLds(MachineInstr &MI) const;
149-
bool selectBVHIntrinsic(MachineInstr &I) const;
149+
bool selectBVHIntersectRayIntrinsic(MachineInstr &I) const;
150150
bool selectSMFMACIntrin(MachineInstr &I) const;
151151
bool selectPermlaneSwapIntrin(MachineInstr &I, Intrinsic::ID IntrID) const;
152152
bool selectWaveAddress(MachineInstr &I) const;

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7030,8 +7030,8 @@ bool AMDGPULegalizerInfo::legalizeDebugTrap(MachineInstr &MI,
70307030
return true;
70317031
}
70327032

7033-
bool AMDGPULegalizerInfo::legalizeBVHIntrinsic(MachineInstr &MI,
7034-
MachineIRBuilder &B) const {
7033+
bool AMDGPULegalizerInfo::legalizeBVHIntersectRayIntrinsic(
7034+
MachineInstr &MI, MachineIRBuilder &B) const {
70357035
MachineRegisterInfo &MRI = *B.getMRI();
70367036
const LLT S16 = LLT::scalar(16);
70377037
const LLT S32 = LLT::scalar(32);
@@ -7167,9 +7167,9 @@ bool AMDGPULegalizerInfo::legalizeBVHIntrinsic(MachineInstr &MI,
71677167
Ops.push_back(MergedOps);
71687168
}
71697169

7170-
auto MIB = B.buildInstr(AMDGPU::G_AMDGPU_INTRIN_BVH_INTERSECT_RAY)
7171-
.addDef(DstReg)
7172-
.addImm(Opcode);
7170+
auto MIB = B.buildInstr(AMDGPU::G_AMDGPU_BVH_INTERSECT_RAY)
7171+
.addDef(DstReg)
7172+
.addImm(Opcode);
71737173

71747174
for (Register R : Ops) {
71757175
MIB.addUse(R);
@@ -7530,7 +7530,7 @@ bool AMDGPULegalizerInfo::legalizeIntrinsic(LegalizerHelper &Helper,
75307530
case Intrinsic::amdgcn_rsq_clamp:
75317531
return legalizeRsqClampIntrinsic(MI, MRI, B);
75327532
case Intrinsic::amdgcn_image_bvh_intersect_ray:
7533-
return legalizeBVHIntrinsic(MI, B);
7533+
return legalizeBVHIntersectRayIntrinsic(MI, B);
75347534
case Intrinsic::amdgcn_swmmac_f16_16x16x32_f16:
75357535
case Intrinsic::amdgcn_swmmac_bf16_16x16x32_bf16:
75367536
case Intrinsic::amdgcn_swmmac_f32_16x16x32_bf16:

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ class AMDGPULegalizerInfo final : public LegalizerInfo {
205205
bool legalizeBufferAtomic(MachineInstr &MI, MachineIRBuilder &B,
206206
Intrinsic::ID IID) const;
207207

208+
bool legalizeBVHIntersectRayIntrinsic(MachineInstr &MI,
209+
MachineIRBuilder &B) const;
210+
208211
bool legalizeLaneOp(LegalizerHelper &Helper, MachineInstr &MI,
209212
Intrinsic::ID IID) const;
210213

llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3217,7 +3217,7 @@ void AMDGPURegisterBankInfo::applyMappingImpl(
32173217
applyMappingImage(B, MI, OpdMapper, RSrcIntrin->RsrcArg);
32183218
return;
32193219
}
3220-
case AMDGPU::G_AMDGPU_INTRIN_BVH_INTERSECT_RAY: {
3220+
case AMDGPU::G_AMDGPU_BVH_INTERSECT_RAY: {
32213221
unsigned N = MI.getNumExplicitOperands() - 2;
32223222
applyDefaultMapping(OpdMapper);
32233223
executeInWaterfallLoop(B, MI, {N});
@@ -5010,7 +5010,7 @@ AMDGPURegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
50105010
assert(RSrcIntrin->IsImage);
50115011
return getImageMapping(MRI, MI, RSrcIntrin->RsrcArg);
50125012
}
5013-
case AMDGPU::G_AMDGPU_INTRIN_BVH_INTERSECT_RAY: {
5013+
case AMDGPU::G_AMDGPU_BVH_INTERSECT_RAY: {
50145014
unsigned N = MI.getNumExplicitOperands() - 2;
50155015
OpdsMapping[0] = AMDGPU::getValueMapping(AMDGPU::VGPRRegBankID, 128);
50165016
OpdsMapping[N] = getSGPROpMapping(MI.getOperand(N).getReg(), MRI, *TRI);

llvm/lib/Target/AMDGPU/SIInstructions.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4341,7 +4341,7 @@ def G_AMDGPU_INTRIN_IMAGE_STORE_D16 : AMDGPUGenericInstruction {
43414341
let mayStore = 1;
43424342
}
43434343

4344-
def G_AMDGPU_INTRIN_BVH_INTERSECT_RAY : AMDGPUGenericInstruction {
4344+
def G_AMDGPU_BVH_INTERSECT_RAY : AMDGPUGenericInstruction {
43454345
let OutOperandList = (outs type0:$dst);
43464346
let InOperandList = (ins unknown:$intrin, variable_ops);
43474347
let hasSideEffects = 0;

0 commit comments

Comments
 (0)