aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorDiana Picus <Diana-Magda.Picus@amd.com>2023-10-06 09:47:41 +0200
committerDiana Picus <Diana-Magda.Picus@amd.com>2023-10-06 10:03:50 +0200
commit2e1718adc86bcdd011ab47cb161eabe58dac251e (patch)
tree1d08062f28ff48f37ede6768e7474e9b09735811 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentfad0919c508a666eb634ea9793a69322143dbd69 (diff)
downloadllvm-2e1718adc86bcdd011ab47cb161eabe58dac251e.zip
llvm-2e1718adc86bcdd011ab47cb161eabe58dac251e.tar.gz
llvm-2e1718adc86bcdd011ab47cb161eabe58dac251e.tar.bz2
Reland "AMDGPU: Duplicate instead of COPY constants from VGPR to SGPR (#66882)"
Teach the si-fix-sgpr-copies pass to deal with REG_SEQUENCE, PHI or INSERT_SUBREG where the result is an SGPR, but some of the inputs are constants materialized into VGPRs. This may happen in cases where for instance several instructions use an immediate zero and SelectionDAG chooses to put it in a VGPR to satisfy all of them. This however causes the si-fix-sgpr-copies to try to switch the whole chain to VGPR and may lead to illegal VGPR-to-SGPR copies. Rematerializing the constant into an SGPR fixes the issue. This was originally reverted because it triggered an unrelated bug in PEI on one of the OpenMP buildbots. That bug has been fixed in #68299, so it should be ok to try again.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions