UniformityAnalysis offers all of the same features and much more, there is no reason left to use the legacy DAs. See RFC: https://discourse.llvm.org/t/rfc-deprecate-divergenceanalysis-legacydivergenceanalysis/69538 - Remove LegacyDivergenceAnalysis.h/.cpp - Remove DivergenceAnalysis.h/.cpp + Unit tests - Remove SyncDependenceAnalysis - it was not a real registered analysis and was only used by DAs - Remove/adjust references to the passes in the docs where applicable - Remove TTI hook associated with those passes. - Move tests to UniformityAnalysis folder. - Remove RUN lines for the DA, leave only the UA ones. - Some tests had to be adjusted/removed depending on how they used the legacy DAs. Reviewed By: foad, sameerds Differential Revision: https://reviews.llvm.org/D148116
34 lines
900 B
LLVM
34 lines
900 B
LLVM
; RUN: opt -mtriple amdgcn-- -passes='print<uniformity>' -disable-output %s 2>&1 | FileCheck %s
|
|
|
|
; CHECK-LABEL: 'test1':
|
|
; CHECK: DIVERGENT: i32 %bound
|
|
; CHECK: {{^ *}} %counter =
|
|
; CHECK: DIVERGENT: %break = icmp sge i32 %counter, %bound
|
|
; CHECK: DIVERGENT: br i1 %break, label %footer, label %body
|
|
; CHECK: {{^ *}}%counter.next =
|
|
; CHECK: {{^ *}}%counter.footer =
|
|
; CHECK: DIVERGENT: br i1 %break, label %end, label %header
|
|
|
|
; Note: %counter is not divergent!
|
|
|
|
define amdgpu_ps void @test1(i32 %bound) {
|
|
entry:
|
|
br label %header
|
|
|
|
header:
|
|
%counter = phi i32 [ 0, %entry ], [ %counter.footer, %footer ]
|
|
%break = icmp sge i32 %counter, %bound
|
|
br i1 %break, label %footer, label %body
|
|
|
|
body:
|
|
%counter.next = add i32 %counter, 1
|
|
br label %footer
|
|
|
|
footer:
|
|
%counter.footer = phi i32 [ %counter.next, %body ], [ undef, %header ]
|
|
br i1 %break, label %end, label %header
|
|
|
|
end:
|
|
ret void
|
|
}
|