[all-commits] [llvm/llvm-project] 1c9125: AMDGPU: Proper use of HasImageInsts in vimage inst...

Changpeng Fang via All-commits all-commits at lists.llvm.org
Mon Mar 4 12:07:01 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c9125cdd5eb8f3e949313a57ff736d87b540546
      https://github.com/llvm/llvm-project/commit/1c9125cdd5eb8f3e949313a57ff736d87b540546
  Author: Changpeng Fang <changpeng.fang at amd.com>
  Date:   2024-03-04 (Mon, 04 Mar 2024)

  Changed paths:
    M llvm/lib/Target/AMDGPU/MIMGInstructions.td

  Log Message:
  -----------
  AMDGPU: Proper use of HasImageInsts in vimage inst definitions, NFC (#83884)

This work corrects a few inappropriate uses of HasImageInsts predicate
in vimage instruction definitions.

In MnemonicAlias for VIMAGE_Atomic_gfx12_Renamed, we also need
HasImageInsts to be in the "Requires" predicate list for the alias to
depend on whether or not the GPU has image instruction support.

For nested uses of "let OtherPredicates = ..." around vimage instruction
definitions, the inner assignment will override the outer one. This
makes the outermost "let OtherPredicates = [HasImageInsts]" unused when
we have an inner assignment. As a result, HasImageInsts is not actually
used for some vimage instructions. To resove this issue, we propogate
the predicates in an outer assignment into the inner one.

We should avoid using nested "let SubtargetPredicate = ...". However, we
can always put the predicate into OtherPtredicates list.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list