[PATCH] D80091: AMDGPU/GlobalISel: Fix masked control flow with fallthrough blocks

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 22 03:36:34 PDT 2020


sameerds added a comment.

I think the patch is okay, but have a couple of doubts about the tests.



================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/divergent-control-flow.ll:40
 ; CHECK-NEXT:    s_and_saveexec_b64 s[4:5], vcc
-; CHECK-NEXT:    s_cbranch_execnz BB1_2
+; CHECK-NEXT:    s_cbranch_execz BB1_2
 ; CHECK-NEXT:  ; %bb.1: ; %if.true
----------------
For this and all other similar updates, does this mean that the existing testcases were actually wrong?


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-brcond.mir:232
+  ; WAVE64:   S_NOP 0
+  ; WAVE64:   SI_LOOP [[COPY2]](s64), %bb.2, implicit-def $exec, implicit-def $scc, implicit $exec
+  ; WAVE64:   G_BR %bb.1
----------------
"backward" is a bit of an understatement when describing this very interesting artifact. I don't know the SI intrinsics very well, but the name suggests it should be a backedge. But this use suggests that the meaning is more general than that: the presence of SI_LOOP instead of a simple conditional branch indicates that the edge is either a backedge or a loop exit.


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

https://reviews.llvm.org/D80091





More information about the llvm-commits mailing list