[SDA] Don't stop divergence propagation at the IPD.
authorJay Foad <jay.foad@gmail.com>
Wed, 18 Sep 2019 13:40:22 +0000 (13:40 +0000)
committerJay Foad <jay.foad@gmail.com>
Wed, 18 Sep 2019 13:40:22 +0000 (13:40 +0000)
commitc92e51d84bb78e4b32c229441af239f154daf75a
tree3f77df1c619a4f5a75e58dc9ebec0269b7d59af3
parentfc1fd6bf9fcfac412b10b4193805ec5de0e8df57
[SDA] Don't stop divergence propagation at the IPD.

Summary:
This fixes B42473 and B42706.

This patch makes the SDA propagate branch divergence until the end of the RPO traversal. Before, the SyncDependenceAnalysis propagated divergence only until the IPD in rpo order. RPO is incompatible with post dominance in the presence of loops. This made the SDA crash because blocks were missed in the propagation.

Reviewers: foad, nhaehnle

Reviewed By: foad

Subscribers: jvesely, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65274

llvm-svn: 372223
llvm/lib/Analysis/SyncDependenceAnalysis.cpp
llvm/test/Analysis/DivergenceAnalysis/AMDGPU/b42473-r1-crash.ll [new file with mode: 0644]