brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 4c05de9 Raw
63 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<simplify>' -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines2; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts;simplify>' -S < %s | FileCheck %s -check-prefix=CODEGEN3;4; for (int i = 0; i < n; i+=1) {5;    (void)A[0];6;    if (21.0 == 0.0)7;      B[0] = 42.0;8; }9;10define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {11entry:12  br label %for13 14for:15  %j = phi i32 [0, %entry], [%j.inc, %inc]16  %j.cmp = icmp slt i32 %j, %n17  br i1 %j.cmp, label %region_entry, label %exit18 19 20    region_entry:21      %val = load double, ptr %A22      %cmp = fcmp oeq double 21.0, 0.023      br i1 %cmp, label %region_true, label %region_exit24 25    region_true:26      store double 42.0, ptr %B27      br label %region_exit28 29    region_exit:30      br label %body31 32    body:33      br label %inc34 35 36inc:37  %j.inc = add nuw nsw i32 %j, 138  br label %for39 40exit:41  br label %return42 43return:44  ret void45}46 47 48; CHECK: Statistics {49; CHECK:     Dead accesses removed: 150; CHECK:     Dead instructions removed: 151; CHECK: }52 53; CHECK:      After accesses {54; CHECK-NEXT:     Stmt_region_entry__TO__region_exit55; CHECK-NEXT:             MayWriteAccess :=   [Reduction Type: NONE] [Scalar: 0]56; CHECK-NEXT:                 [n] -> { Stmt_region_entry__TO__region_exit[i0] -> MemRef_B[0] };57; CHECK-NEXT: }58 59 60; CODEGEN:      polly.stmt.region_entry:61; CODEGEN-NEXT:   %p_cmp = fcmp oeq double 2.100000e+01, 0.000000e+0062; CODEGEN-NEXT:   br i1 %p_cmp63