[llvm] [AMDGPU] Add intrinsic and MI for image_bvh_dual_intersect_ray (PR #130038)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 7 07:57:54 PST 2025
================
@@ -3217,10 +3217,13 @@ void AMDGPURegisterBankInfo::applyMappingImpl(
applyMappingImage(B, MI, OpdMapper, RSrcIntrin->RsrcArg);
return;
}
- case AMDGPU::G_AMDGPU_BVH_INTERSECT_RAY: {
- unsigned N = MI.getNumExplicitOperands() - 2;
+ case AMDGPU::G_AMDGPU_BVH_INTERSECT_RAY:
+ case AMDGPU::G_AMDGPU_BVH_DUAL_INTERSECT_RAY: {
+ bool IsDual = MI.getOpcode() == AMDGPU::G_AMDGPU_BVH_DUAL_INTERSECT_RAY;
+ unsigned NumMods = !IsDual ? 1 : 0; // Has A16 modifier
+ unsigned LastRegOpIdx = (MI.getNumExplicitOperands() - 1) - NumMods;
----------------
jayfoad wrote:
```suggestion
unsigned NumMods = IsDual ? 0 : 1; // Has A16 modifier
unsigned LastRegOpIdx = MI.getNumExplicitOperands() - 1 - NumMods;
```
https://github.com/llvm/llvm-project/pull/130038
More information about the llvm-commits
mailing list