[PATCH] D69182: [AMDGPU] Fix Vreg_1 PHI lowering in SILowerI1Copies.

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 10:11:49 PDT 2019


cdevadas created this revision.
cdevadas added a reviewer: nhaehnle.
Herald added subscribers: llvm-commits, jfb, t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.

There is a minor flaw in the implementation of function lowerPhis.
This function replaces values of regclass Vreg_1 (boolean values)
involved in PHIs into an SGPR. Currently it iterates over the MBBs
and performs an inplace lowering of PHIs and fails to lower any
incoming value that itself is another PHI of Vreg_1 regclass.
The failure occurs only when the MBB where the incoming PHI value
belongs is not visited/lowered yet.

To fix this problem, collect all Vreg_1 PHIs upfront and then
perform the lowering.


Repository:
  rL LLVM

https://reviews.llvm.org/D69182

Files:
  lib/Target/AMDGPU/SILowerI1Copies.cpp
  test/CodeGen/AMDGPU/i1_copy_phi_with_phi_incoming_value.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69182.225656.patch
Type: text/x-patch
Size: 14482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191018/558911df/attachment.bin>


More information about the llvm-commits mailing list