[llvm-bugs] [Bug 42473] New: SyncDependenceAnalysis: Crash on loop with split block

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 1 15:27:04 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42473

            Bug ID: 42473
           Summary: SyncDependenceAnalysis: Crash on loop with split block
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: pjcoup at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22176
  --> https://bugs.llvm.org/attachment.cgi?id=22176&action=edit
SyncDependenceAnalysis crash

Compare the attached r0.ll (working) and r1.ll (exposes crash):
Reproduce with opt -mtriple amdgcn-unknown-amdhsa -analyze -divergence
-use-gpu-divergence-analysis r1.ll

--- r0.ll       2019-07-01 15:17:57.372404000 -0700
+++ r1.ll       2019-07-01 15:16:57.458441000 -0700
@@ -26,7 +26,7 @@
   br label %while.end

 while.body:
-  %i.026 = phi i32 [ %inc, %if.end ], [ 0, %while.body.preheader ]
+  %i.026 = phi i32 [ %inc, %if.end.while.body_crit_edge ], [ 0,
%while.body.preheader ]
   %call3 = tail call  i32 @gf1(i32 0) #4
   %cmp4 = icmp ult i32 %call3, 10
   %arrayidx6 = getelementptr inbounds i32, i32 addrspace(4)* %A, i32 %i.026
@@ -50,7 +50,10 @@
   store i32 %storemerge, i32 addrspace(4)* %arrayidx10, align 4
   %inc = add nuw nsw i32 %i.026, 1
   %exitcond = icmp ne i32 %inc, %0
-  br i1 %exitcond, label %while.body, label %while.end.loopexit
+  br i1 %exitcond, label %if.end.while.body_crit_edge, label
%while.end.loopexit
+
+if.end.while.body_crit_edge:
+  br label %while.body

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190701/297eea26/attachment.html>


More information about the llvm-bugs mailing list