[PATCH] D120909: [AMDGPU] Tweak predicates for image_bvh_intersect_ray instructions

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 09:44:59 PST 2022


rampitec accepted this revision.
rampitec added a comment.
This revision is now accepted and ready to land.

Regardless if you decide to use both predicates or not this is LGTM.



================
Comment at: llvm/lib/Target/AMDGPU/MIMGInstructions.td:1090
 
+let OtherPredicates = [HasGFX10_AEncoding] in {
 defm IMAGE_BVH_INTERSECT_RAY       : MIMG_IntersectRay<mimgopc<0xe6>, "image_bvh_intersect_ray", 0, 0>;
----------------
foad wrote:
> Joe_Nash wrote:
> > Do you need to concatenate Predicates set in the enclosing scope? Isn't this overriding let OtherPredicates = [HasImageInsts] ?
> > That may not matter in practice if HasGFX10_AEncoding implies HasImageInsts
> Yes this relies on HasGFX10_AEncoding being a subset of HasImageInsts. The code just above was already doing this for HasExtendedImageInsts so I thought it was OK like that.
This is a list, so you could use both is that is a concern: [HasGFX10_AEncoding, HasImageInsts].


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120909/new/

https://reviews.llvm.org/D120909



More information about the llvm-commits mailing list