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.
35 lines
884 B
LLVM
35 lines
884 B
LLVM
; RUN: opt %loadNPMPolly -passes=polly-codegen -S < %s | FileCheck %s -check-prefix=CHECK-CODE
|
|
|
|
; void f(long A[], long N) {
|
|
; long i;
|
|
; if (true)
|
|
; for (i = 0; i < N; ++i)
|
|
; A[i] = i;
|
|
; }
|
|
|
|
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
|
|
|
|
define void @f(ptr %A, i64 %N) nounwind {
|
|
entry:
|
|
fence seq_cst
|
|
br label %next
|
|
|
|
next:
|
|
br i1 true, label %for.i, label %return
|
|
|
|
for.i:
|
|
%indvar = phi i64 [ 0, %next], [ %indvar.next, %for.i ]
|
|
%scevgep = getelementptr i64, ptr %A, i64 %indvar
|
|
store i64 %indvar, ptr %scevgep
|
|
%indvar.next = add nsw i64 %indvar, 1
|
|
%exitcond = icmp eq i64 %indvar.next, %N
|
|
br i1 %exitcond, label %return, label %for.i
|
|
|
|
return:
|
|
fence seq_cst
|
|
ret void
|
|
}
|
|
|
|
; CHECK-CODE: polly.split_new_and_old
|
|
; CHECK-CODE: polly.merge_new_and_old
|