[PATCH] D47984: AMDGPU/SI: Fix two missing NodeNum checks for SISched

Axel Davy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 1 11:03:32 PDT 2018


axeldavy added a comment.

It was quite hard and a long work to find a test for this issue.

A COPY operation doesn't usually have ExitSU as successor.
The following test (extracted from crashing app) triggers this behaviour on llvm 5 though:

  ---
  name:            sisched-crash
  tracksRegLiveness: true
  registers:
    - { id: 0, class: vreg_512, preferred-register: '' }
  body:             |
    bb.0:
    liveins:
      undef %0.sub0 = V_MOV_B32_e32 -1063317674, implicit %exec
      %0.sub1 = V_MOV_B32_e32 -1069424300, implicit %exec
      %0.sub2 = V_MOV_B32_e32 -1073212503, implicit %exec
      %0.sub3 = V_MOV_B32_e32 -1077848048, implicit %exec
      %0.sub4 = V_MOV_B32_e32 -1081645570, implicit %exec
      %0.sub5 = V_MOV_B32_e32 -1091633047, implicit %exec
      %0.sub6 = V_MOV_B32_e32 1039433088, implicit %exec
      %0.sub7 = V_MOV_B32_e32 1060467916, implicit %exec
      %0.sub8 = V_MOV_B32_e32 1067795870, implicit %exec
      %0.sub9 = COPY %0.sub8
  ... 

I've no clue why this particular sequence of instructions (I tried smaller %0 register, writing fewer subs and it doesn't fail !).

The test doesn't crash though when tested under llvm svn.

I don't see any other way of triggering the 'ExitSU among the successors of a COPY op'.
Maybe the bug is fixed with svn (I have no more time to test with mesa linked to llvm svn), but I'd suggest merge the fix anyway to be more future-proof.


Repository:
  rL LLVM

https://reviews.llvm.org/D47984





More information about the llvm-commits mailing list