HomePhabricator

[AMDGPU] Remove unnecessary v_mov from a register to itself in WQM lowering.

Authored by mjbedy on Dec 11 2019, 7:31 PM.

Description

[AMDGPU] Remove unnecessary v_mov from a register to itself in WQM lowering.

Summary:

  • SI Whole Quad Mode phase is replacing WQM pseudo instructions with v_mov instructions.

While this is necessary for the special handling of moving results out of WWM live ranges,
it is not necessary for WQM live ranges. The result is a v_mov from a register to itself after every
WQM operation. This change uses a COPY psuedo in these cases, which allows the register
allocator to coalesce the moves away.

Reviewers: tpr, dstuttard, foad, nhaehnle

Reviewed By: nhaehnle

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71386

Details