https://bugs.llvm.org/show_bug.cgi?id=42741
Bug ID: 42741
Summary: LegacyDivergenceAnalysis: sync dependence misses some
divergent uses outside a loop
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Global Analyses
Assignee: unassignedb...@nondot.org
Reporter: jay.f...@gmail.com
CC: llvm-bugs@lists.llvm.org
Created attachment 22281
--> https://bugs.llvm.org/attachment.cgi?id=22281&action=edit
test case
See the attached test case,
test/Analysis/LegacyDivergenceAnalysis/AMDGPU/syncbug.ll.
%tmp7 is divergent because it's sync-dependent on the divergent loop exit
condition %tmp5, but LegacyDivergenceAnalysis does not mark it as divergent.
Quoting from LegacyDivergenceAnalysis.cpp:
// Propagation rule 2: if a value defined in a loop is used outside, the user
// is sync dependent on the condition of the loop exits that dominate the
// user. For example,
OK.
// The algorithm used here handles both natural and unstructured loops.
Given
// a branch TI, we first compute its influence region, the union of all
simple
// paths from TI to its immediate post dominator (IPostDom). Then, we search
// for all the values defined in the influence region but used outside. All
// these users are sync dependent on TI.
This algorithm doesn't appear to work. The influence region includes all blocks
from bb2 to bb8, so %tmp7 is never marked divergent by this algorithm because
it is not outside the influence region.
This might be related to 37185.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs