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.
parent
930e7ff9
Please register or sign in to comment