-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU] Fix predicates on FLAT scratch ST/SVS mode Pseudos (#85442)
Definitions like this did not work as intended: let is_flat_scratch = 1 in { let SubtargetPredicate = HasFlatScratchSVSMode in def _SVS : FLAT_Scratch_Load_Pseudo<opName, regClass, HasTiedOutput, 1, 1>, FlatScratchInst<opName, "SVS">; let SubtargetPredicate = HasFlatScratchSTMode in def _ST : FLAT_Scratch_Load_Pseudo<opName, regClass, HasTiedOutput, 0, 0, 0>, FlatScratchInst<opName, "ST">; } They tried to override SubtargetPredicate, but then it was overridden again (back to its default value) by setting is_flat_scratch, which caused SubtargetPredicate to be recalculated in the base class. (This patch also removes some overrides of SubtargetPredicate that are redundant due to being recalculated in the base class.) Fix this by pushing overrides of is_flat_scratch and is_flat_global "in" as far as possible. This has the added benefit that there is no need to override them around groups of Pseudo definitions like this: let is_flat_global = 1 in { defm GLOBAL_ATOMIC_CMPSWAP : FLAT_Global_Atomic_Pseudo <"global_atomic_cmpswap", VGPR_32, i32, v2i32, VReg_64>; ... } which are plainly Global instructions anyway. Verified by inspecting the output of TableGen. It seems to be NFC in practice.
- Loading branch information
Showing
1 changed file
with
69 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters