[PATCH] D112731: [AMDGPU] Really preserve LiveVariables in SILowerControlFlow

Ruiling, Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 00:57:19 PDT 2021


ruiling accepted this revision.
ruiling added a comment.
This revision is now accepted and ready to land.

To the best of my knowledge, the change looks good. But wait one or two days in case others may have more comments. And one corner case which I think also needs to be updated.



================
Comment at: llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp:719-720
   Register CountReg = MRI->createVirtualRegister(&AMDGPU::SGPR_32RegClass);
   auto BfeMI = BuildMI(*MBB, FirstMI, DL, TII->get(AMDGPU::S_BFE_U32), CountReg)
                    .addReg(InputReg)
                    .addImm((MI.getOperand(1).getImm() & Mask) | 0x70000);
----------------
Here I think the use of `InputReg` can be a possible kill. Actually we should inherit the possible KILL state from original pseudo instruction. and also replace the `Kills` of `InputReg`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112731/new/

https://reviews.llvm.org/D112731



More information about the llvm-commits mailing list