- Fixed liveness issue with implicit kills.
- Fixed potential problem with an indirect mov.
Fixes: SWDEV-256848
Paths
| Differential D89599
[AMDGPU] Fixed v_swap_b32 match ClosedPublic Authored by rampitec on Oct 16 2020, 3:28 PM.
Details
Summary
Fixes: SWDEV-256848
Diff Detail Event TimelineComment Actions
It can be implicit def or implicit kill. In both cases verifier will complain if it is dropped. Then the problem is there can be other instructions in between of the combined three and correct licenses may be needed in that range. That is probably possible to preserve implicit operands on the move at the insertion point and carry it over to the swap, but I am not so sure about the other two. Insert there an IMPLICIT_DEF or KILL?
This revision is now accepted and ready to land.Oct 21 2020, 9:57 AM Closed by commit rG611959f004d7: [AMDGPU] Fixed v_swap_b32 match (authored by rampitec). · Explain WhyOct 21 2020, 10:14 AM This revision was automatically updated to reflect the committed changes. Comment Actions When I build the latest version of the AMDGPU target, I get the warning shown below, which was treated as an error. I believe it started happening with this revision. I'm running on Windows. Does it need to be: if (Size > 1 && (I->getNumImplicitOperands() > (I->isCopy() ? 0U : 1U))) ...SIShrinkInstructions.cpp(551): warning C4018: '>': signed/unsigned mismatch This revision is now accepted and ready to land.Oct 24 2020, 11:04 AM Comment Actions
Changed to 0U and 1U in ad8131bb03d0abd9e0586b9fa91d45cbf90ca83e. Comment Actions Yes, I was rather surprised about the warning, too. This is the first time I've seen it, though I've been working on LLVM for only a couple of months. Thanks!
Revision Contents
Diff 299467 llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
llvm/test/CodeGen/AMDGPU/v_swap_b32.mir
|
Rather than special casing exec, this should check if the number of operands matches the number in the MCInstrDesc