Files
clang-p2996/polly/test/CodeGen/run-time-condition-with-scev-parameters.ll
Michael Kruse 5c02808131 [polly] Introduce -polly-print-* passes to replace -analyze.
The `opt -analyze` option only works with the legacy pass manager and might be removed in the future, as explained in llvm.org/PR53733. This patch introduced -polly-print-* passes that print what the pass would print with the `-analyze` option and replaces all uses of `-analyze` in the regression tests.

There are two exceptions: `CodeGen\single_loop_param_less_equal.ll` and `CodeGen\loop_with_condition_nested.ll` use `-analyze on the `-loops` pass which is not part of Polly.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D120782
2022-03-14 10:27:15 -05:00

40 lines
1.4 KiB
LLVM

; RUN: opt %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s --check-prefix=AST
; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
; TODO: FIXME: Simplify the context.
; AST: if (n >= 1 && 0 == n <= -1)
; CHECK: entry:
; CHECK-NEXT: %0 = zext i32 %n to i64
; CHECK: polly.split_new_and_old:
; CHECK-NEXT: %1 = sext i32 %n to i64
; CHECK-NEXT: %2 = icmp sge i64 %1, 1
; CHECK-NEXT: %3 = sext i32 %n to i64
; CHECK-NEXT: %4 = icmp sle i64 %3, -1
; CHECK-NEXT: %5 = sext i1 %4 to i64
; CHECK-NEXT: %6 = icmp eq i64 0, %5
; CHECK-NEXT: %7 = and i1 %2, %6
; CHECK-NEXT: %polly.rtc.result = and i1 %7, true
; CHECK-NEXT: br i1 %polly.rtc.result, label %polly.start, label %for.body4
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
define void @init_array(i32 %n, double* %data) {
entry:
%0 = zext i32 %n to i64
br label %for.body4
for.body4: ; preds = %for.body4, %entry
%indvar1 = phi i64 [ %indvar.next2, %for.body4 ], [ 0, %entry ]
%.moved.to.for.body4 = mul i64 %0, %indvar1
%1 = add i64 %.moved.to.for.body4, 0
%arrayidx7 = getelementptr double, double* %data, i64 %1
store double undef, double* %arrayidx7, align 8
%indvar.next2 = add i64 %indvar1, 1
br i1 false, label %for.body4, label %for.end10
for.end10: ; preds = %for.body4
ret void
}