[PATCH] D117796: AMDGPU: Fix LiveVariables error after lowering SI_END_CF

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 06:42:18 PST 2022


arsenm added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/lower-control-flow-live-variables-update.mir:60-87
+  bb.0:
+    successors: %bb.2(0x40000000), %bb.1(0x40000000)
+    liveins: $vgpr0
+
+    %0:vgpr_32 = COPY killed $vgpr0
+    %1:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
+    %2:sreg_64_xexec = V_CMP_EQ_U32_e64 0, killed %0, implicit $exec
----------------
ruiling wrote:
> Could you show me the .ll and the llc command to reproduce the issue? the test has irreducible control flow, something must be wrong in early pass.
You hit this failure by adding -global-isel to test/CodeGen/AMDGPU/salu-to-valu.ll. GlobalISel avoids some extra copies the DAG happens to emit, which (correctly) allows for tail duplicating the SI_IF. We can't rely on reducible control flow or specific instruction+control flow patterns being preserved


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

https://reviews.llvm.org/D117796



More information about the llvm-commits mailing list