[PATCH] D69953: MCP: Fixed bug with dest overlapping copy source
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 10:58:01 PST 2019
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:439-442
+ for (const MachineOperand &MO : MI.defs()) {
+ if ((Overlap = TRI->regsOverlap(MO.getReg(), CopySrcReg)))
+ break;
+ }
----------------
This will miss implicit defs. Should be checking MI.modifiesRegister maybe?
================
Comment at: llvm/test/CodeGen/AMDGPU/mcp-overlap-after-propagation.mir:20
+ renamable $sgpr8 = COPY killed renamable $sgpr2
+ renamable $sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67 = S_LOAD_DWORDX8_IMM renamable $sgpr8_sgpr9, 144, 0, 0 :: (invariant load 32, align 16, addrspace 4)
+ renamable $sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95 = COPY killed renamable $sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67
----------------
Should add another case where the relevant def is an implicit def
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69953/new/
https://reviews.llvm.org/D69953
More information about the llvm-commits
mailing list