This reverts commit e987ab11a6f3d3965ef26fc42c82db3e8b1d56f5. This broke premerge: 1. https://lab.llvm.org/staging/#/builders/192/builds/9521 2. https://github.com/llvm/llvm-project/actions/runs/19054182009 Notably this did not break inside the PR. Not exactly sure why. I realize that there is a lot of test churn here, but they're largely in polly where commit frequency is much lower, so a reapply of the patch should be clean.
32 lines
1.0 KiB
LLVM
32 lines
1.0 KiB
LLVM
; RUN: opt %loadNPMPolly '-passes=print<polly-detect>' -disable-output < %s 2>&1 | FileCheck %s
|
|
; RUN: opt %loadNPMPolly -passes=polly-codegen -verify-region-info -disable-output < %s
|
|
;
|
|
; This is a scop directly precedented by a region, i.e. the scop's entry is the
|
|
; region's exit block. This test is to ensure that the RegionInfo is correctly
|
|
; preserved.
|
|
;
|
|
; CHECK: Valid Region for Scop: region2 => return
|
|
;
|
|
define void @f1(ptr %A, i64 %N) nounwind {
|
|
entry:
|
|
br label %region1
|
|
|
|
region1:
|
|
%indvar1 = phi i64 [ 0, %entry ], [ %indvar1.next, %region1 ]
|
|
fence seq_cst
|
|
%indvar1.next = add nsw i64 %indvar1, 1
|
|
%exitcond1 = icmp eq i64 %indvar1.next, %N
|
|
br i1 %exitcond1, label %region2, label %region1
|
|
|
|
region2:
|
|
%indvar2 = phi i64 [ 0, %region1 ], [ %indvar2.next, %region2 ]
|
|
%scevgep2 = getelementptr i64, ptr %A, i64 %indvar2
|
|
store i64 %indvar2, ptr %scevgep2
|
|
%indvar2.next = add nsw i64 %indvar2, 1
|
|
%exitcond2 = icmp eq i64 %indvar2.next, %N
|
|
br i1 %exitcond2, label %return, label %region2
|
|
|
|
return:
|
|
ret void
|
|
}
|