aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ModuloSchedule.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2024-03-17 09:42:44 +0000
committerGitHub <noreply@github.com>2024-03-17 09:42:44 +0000
commitbfb868201f821047015465fb3f0afa6daa321b5f (patch)
tree82f2221455bfb1d079a1b3a027267d1ffb5fad08 /llvm/lib/CodeGen/ModuloSchedule.cpp
parentf3c5278efa3b783ada9e7a34b751cf4c5b864535 (diff)
downloadllvm-bfb868201f821047015465fb3f0afa6daa321b5f.zip
llvm-bfb868201f821047015465fb3f0afa6daa321b5f.tar.gz
llvm-bfb868201f821047015465fb3f0afa6daa321b5f.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions