[PATCH] D59312: AMDGPU: Fix a SIAnnotateControlFlow issue when there are multiple backedges.

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 21:20:03 PDT 2019


cfang marked 2 inline comments as done.
cfang added inline comments.


================
Comment at: lib/Target/AMDGPU/SIAnnotateControlFlow.cpp:274
+    // track of the number of threads exited the loop at BB.
+    else if (L->contains(Pred) && DT->dominates(Pred, BB))
+      PHIValue = Broken;
----------------
arsenm wrote:
> Could this still break for some block that is in the loop, but doesn't dominate BB?
I don’t think so. Given single entry single exit regions, and inside the loop, when BB and Pred are both backedge blocks, either Pred dominates BB or BB dominates Pred.


================
Comment at: test/CodeGen/AMDGPU/si-annotatecfg-multiple-backedges.ll:2
+; RUN: opt -mtriple=amdgcn-- -S -structurizecfg -si-annotate-control-flow %s | FileCheck -check-prefix=OPT %s
+
+
----------------
arsenm wrote:
> I kind of think we should just start generating the checks for any test that deals with control flow
What do you want me to do here?


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

https://reviews.llvm.org/D59312





More information about the llvm-commits mailing list