diff options
author | Changpeng Fang <changpeng.fang@amd.com> | 2024-03-08 10:30:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-08 10:30:01 -0800 |
commit | 839a8fecb4c5dfe1b4484d5fc942a9490867c47a (patch) | |
tree | cbf1bf177b317d2bc8ef9391e1b721f9439ad6d0 /lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp | |
parent | a456885efc95eb141d051ade517432c531d427f7 (diff) | |
download | llvm-839a8fecb4c5dfe1b4484d5fc942a9490867c47a.zip llvm-839a8fecb4c5dfe1b4484d5fc942a9490867c47a.tar.gz llvm-839a8fecb4c5dfe1b4484d5fc942a9490867c47a.tar.bz2 |
AMDGPU: Copy SubtargetPredicate from pseudo to real for dpp16 and dpp8 (#84517)
We usually expect to copy SubtargetPredicate (and OtherPredicates) from
pseudo to real. However, in dpp16 and dpp8, there are assignments like
SubtargetPredicate = HasDPP/HasDPP16/HasDpp8. These assignments override
predicates copied from pseudo, and thus the predicates used to define
pseudo get lost.
Losing predicates is a subtle issue usually not easy to be found. It may
result in instructions being generated on GPUs that do not support the
features to generate them.
https://github.com/llvm/llvm-project/pull/84354 addressed one of such
issues, and inspired this work.
Fortunately, we found that the assignment of SubtargetPredicate usually
comes together with assignment of AssemblerPredicate, and with the same
value. For example:
let AssemblerPredicate = HasDPP16;
let SubtargetPredicate = HasDPP16;
One of them is redundant and can be removed.
In this work, we remove the redundant assignment of SubtargetPredicate,
and then copy it from pseudo for VOP*_DPP and VOP*_DPP8. With this
change, we can safely use SubtargetPredicate to define pseudo
instructions.
Diffstat (limited to 'lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp')
0 files changed, 0 insertions, 0 deletions