Skip to content

Commit 6534bbe

Browse files
Subtarget feature for bvh dual and bvh8
1 parent ac8fb52 commit 6534bbe

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

llvm/lib/Target/AMDGPU/AMDGPU.td

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,10 +1094,10 @@ def FeaturePrngInst : SubtargetFeature<"prng-inst",
10941094
"Has v_prng_b32 instruction"
10951095
>;
10961096

1097-
def FeatureBVHDualInst : SubtargetFeature<"bvh-dual-inst",
1098-
"HasBVHDualInst",
1097+
def FeatureBVHDualAndBVH8Insts : SubtargetFeature<"bvh-dual-bvh-8-insts",
1098+
"HasBVHDualAndBVH8Insts",
10991099
"true",
1100-
"Has image_bvh_dual_intersect_ray instruction"
1100+
"Has image_bvh_dual_intersect_ray and image_bvh8_intersect_ray instructions"
11011101
>;
11021102

11031103
//===------------------------------------------------------------===//
@@ -1857,7 +1857,7 @@ def FeatureISAVersion12 : FeatureSet<
18571857
FeatureMaxHardClauseLength32,
18581858
Feature1_5xVGPRs,
18591859
FeatureMemoryAtomicFAddF32DenormalSupport,
1860-
FeatureBVHDualInst
1860+
FeatureBVHDualAndBVH8Insts
18611861
]>;
18621862

18631863
def FeatureISAVersion12_Generic: FeatureSet<
@@ -2513,8 +2513,8 @@ def HasBitOp3Insts : Predicate<"Subtarget->hasBitOp3Insts()">,
25132513
def HasPrngInst : Predicate<"Subtarget->hasPrngInst()">,
25142514
AssemblerPredicate<(all_of FeaturePrngInst)>;
25152515

2516-
def HasBVHDualInst : Predicate<"Subtarget->hasBVHDualInst()">,
2517-
AssemblerPredicate<(all_of FeatureBVHDualInst)>;
2516+
def HasBVHDualAndBVH8Insts : Predicate<"Subtarget->hasBVHDualAndBVH8Insts()">,
2517+
AssemblerPredicate<(all_of FeatureBVHDualAndBVH8Insts)>;
25182518

25192519
def HasFP8ConversionScaleInsts : Predicate<"Subtarget->hasFP8ConversionScaleInsts()">,
25202520
AssemblerPredicate<(all_of FeatureFP8ConversionScaleInsts)>;

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7214,7 +7214,7 @@ bool AMDGPULegalizerInfo::legalizeBVHDualOrBVH8IntersectRayIntrinsic(
72147214
Register Offsets = MI.getOperand(9).getReg();
72157215
Register TDescr = MI.getOperand(10).getReg();
72167216

7217-
if (!ST.hasBVHDualInst()) {
7217+
if (!ST.hasBVHDualAndBVH8Insts()) {
72187218
DiagnosticInfoUnsupported BadIntrin(B.getMF().getFunction(),
72197219
"intrinsic not supported on subtarget",
72207220
MI.getDebugLoc());

llvm/lib/Target/AMDGPU/GCNSubtarget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
229229
bool HasRestrictedSOffset = false;
230230
bool HasBitOp3Insts = false;
231231
bool HasPrngInst = false;
232-
bool HasBVHDualInst = false;
232+
bool HasBVHDualAndBVH8Insts = false;
233233
bool HasPermlane16Swap = false;
234234
bool HasPermlane32Swap = false;
235235
bool HasVcmpxPermlaneHazard = false;
@@ -1366,7 +1366,7 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
13661366

13671367
bool hasPrngInst() const { return HasPrngInst; }
13681368

1369-
bool hasBVHDualInst() const { return HasBVHDualInst; }
1369+
bool hasBVHDualAndBVH8Insts() const { return HasBVHDualAndBVH8Insts; }
13701370

13711371
/// Return the maximum number of waves per SIMD for kernels using \p SGPRs
13721372
/// SGPRs

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9458,7 +9458,7 @@ SDValue SITargetLowering::LowerINTRINSIC_W_CHAIN(SDValue Op,
94589458
assert(NodePtr.getValueType() == MVT::i64);
94599459
assert(RayDir.getValueType() == MVT::v3f32);
94609460

9461-
if (!Subtarget->hasBVHDualInst()) {
9461+
if (!Subtarget->hasBVHDualAndBVH8Insts()) {
94629462
emitRemovedIntrinsicError(DAG, DL, Op.getValueType());
94639463
return SDValue();
94649464
}

0 commit comments

Comments
 (0)