llvm-project/polly/test/CodeGen/OpenMP/mapped-phi-access.ll
Aiden Grossman a22d1c2225 Revert "[Polly] Introduce PhaseManager and remove LPM support (#125442)"
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.
2025-11-04 01:31:18 +00:00

53 lines
2.3 KiB
LLVM

; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb -polly-parallel '-passes=polly-delicm,polly-codegen' -S < %s | FileCheck %s
;
; Verify that -polly-parallel can handle mapped scalar MemoryAccesses.
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; Function Attrs: nounwind uwtable
define void @main() local_unnamed_addr {
entry:
%0 = load ptr, ptr undef, align 8, !tbaa !1
%1 = load ptr, ptr undef, align 8, !tbaa !1
br label %for.body65.i226
for.body65.i226: ; preds = %for.inc85.i238, %entry
%indvars.iv8.i223 = phi i64 [ 0, %entry ], [ %indvars.iv.next9.i236, %for.inc85.i238 ]
%arrayidx70.i224 = getelementptr inbounds double, ptr %1, i64 %indvars.iv8.i223
br label %for.body68.i235
for.body68.i235: ; preds = %for.body68.i235, %for.body65.i226
%2 = phi double [ undef, %for.body65.i226 ], [ undef, %for.body68.i235 ]
%indvars.iv.i227 = phi i64 [ 0, %for.body65.i226 ], [ %indvars.iv.next.i233, %for.body68.i235 ]
%arrayidx74.i228 = getelementptr inbounds [4000 x double], ptr %0, i64 %indvars.iv8.i223, i64 %indvars.iv.i227
%3 = load double, ptr %arrayidx74.i228, align 8, !tbaa !5
store double undef, ptr %arrayidx70.i224, align 8, !tbaa !5
%indvars.iv.next.i233 = add nuw nsw i64 %indvars.iv.i227, 1
%exitcond.i234 = icmp eq i64 %indvars.iv.next.i233, 4000
br i1 %exitcond.i234, label %for.inc85.i238, label %for.body68.i235
for.inc85.i238: ; preds = %for.body68.i235
%indvars.iv.next9.i236 = add nuw nsw i64 %indvars.iv8.i223, 1
%exitcond10.i237 = icmp eq i64 %indvars.iv.next9.i236, 4000
br i1 %exitcond10.i237, label %kernel_gemver_StrictFP.exit, label %for.body65.i226
kernel_gemver_StrictFP.exit: ; preds = %for.inc85.i238
ret void
}
!llvm.ident = !{!0}
!0 = !{!"clang version 6.0.0 "}
!1 = !{!2, !2, i64 0}
!2 = !{!"any pointer", !3, i64 0}
!3 = !{!"omnipotent char", !4, i64 0}
!4 = !{!"Simple C/C++ TBAA"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !3, i64 0}
; CHECK-LABEL: define internal void @main_polly_subfn(ptr %polly.par.userContext)
;
; CHECK: polly.stmt.for.body65.i226:
; CHECK-NEXT: %polly.access.polly.subfunc.arg.[[R1:[0-9]*]] = getelementptr double, ptr %polly.subfunc.arg.[[R0:[0-9]*]], i64 %polly.indvar
; CHECK-NEXT: store double undef, ptr %polly.access.polly.subfunc.arg.[[R1]]