[all-commits] [llvm/llvm-project] 2e1718: Reland "AMDGPU: Duplicate instead of COPY constant...
Diana via All-commits
all-commits at lists.llvm.org
Fri Oct 6 01:04:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e1718adc86bcdd011ab47cb161eabe58dac251e
https://github.com/llvm/llvm-project/commit/2e1718adc86bcdd011ab47cb161eabe58dac251e
Author: Diana Picus <Diana-Magda.Picus at amd.com>
Date: 2023-10-06 (Fri, 06 Oct 2023)
Changed paths:
M llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
M llvm/test/CodeGen/AMDGPU/fix-sgpr-copies.mir
Log Message:
-----------
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.
More information about the All-commits
mailing list