[llvm-bugs] [Bug 25864] New: Divergence Analysis: Constant load in branch considered divergent
llvm-bugs at lists.llvm.org
Thu Dec 17 07:13:07 PST 2015
Bug ID: 25864
Summary: Divergence Analysis: Constant load in branch
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: tstellar at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 15479
I've run into this issue with the DivergenceAnalysis pass, and I'm not sure if
it is a bug or if it is expected behavior. Attached is the test case, which
can be reproduced by applying this patch: http://reviews.llvm.org/D15608
opt -analyze -divergence -mtriple=amdgcn-- divergent-test.ll
The output I get from the divergence analysis pass is this:
DIVERGENT: float %arg1
DIVERGENT: %tmp2 = fcmp ueq float %arg1, 0.000000e+00
DIVERGENT: br i1 %tmp2, label %bb7, label %bb3
DIVERGENT: %tmp4 = phi i1 [ false, %bb7 ], [ true, %bb ]
DIVERGENT: br i1 %tmp4, label %bb5, label %bb9
DIVERGENT: %tmp6 = call float @llvm.SI.load.const(<16 x i8> %tmp, i32 16)
^ This last line is what I think it incorrect. This is a constant load
intrinsic, which takes a non-divergent argument, so it shouldn't be divergent.
I have verified that AMDGPU's implementation of
TargetTransformInfo::isSourceOfDivergence() returns false for this intrinsic.
Based on brief debugging of the issue I think the problem may be that the
DivergenceAnalysis pass incorrectly things this test case contains a loop, but
I'm not really sure.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs