brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · ab0329a Raw
47 lines · plain
1; RUN: opt %loadNPMPolly -polly -O0 -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=OFF2; RUN: opt %loadNPMPolly -polly -O1 -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ON3; RUN: opt %loadNPMPolly -polly -O2 -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ON4; RUN: opt %loadNPMPolly -polly -O3 -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ON5; RUN: opt %loadNPMPolly -polly -Os -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=OFF6; RUN: opt %loadNPMPolly -polly -Oz -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=OFF7;8; Check that Polly's default pipeline works from detection to code generation9; with either pass manager.10; The presence of the BB polly.stmt.body.lr.ph indicates that the statement11; has been re-generated by Polly. It should not have been merged with other12; BBs by SimplifyCFG.13;14; for (int j = 0; j < n; j += 1) {15;   A[0] = 42.0;16; }17;18define void @func(i32 %n, ptr noalias nonnull %A) {19entry:20  br label %for21 22for:23  %j = phi i32 [0, %entry], [%j.inc, %inc]24  %j.cmp = icmp slt i32 %j, %n25  br i1 %j.cmp, label %body, label %exit26 27    body:28      store double 42.0, ptr %A29      br label %inc30 31inc:32  %j.inc = add nuw nsw i32 %j, 133  br label %for34 35exit:36  br label %return37 38return:39  ret void40}41 42 43; CHECK-LABEL: define void @func(44; ON:       polly.stmt.body.lr.ph:45; ON-NEXT:    store double 4.200000e+01, ptr %A, align 846; OFF-NOT:  polly47