brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · cb12700 Raw
63 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts;opt-isl>,polly<no-default-opts>' -S < %s | FileCheck %s2; RUN: opt %loadNPMPolly '-passes=function(polly<no-default-opts;opt-isl>),function(polly<no-default-opts>)' -S < %s | FileCheck %s3;4; llvm.org/PR344415; Properly handle multiple -polly-scops/-polly-codegen in the same6; RegionPassManager. -polly-codegen must not reuse the -polly-ast analysis the7; was created for the first -polly-scops pass.8; The current solution is that only the first -polly-codegen is allowed to9; generate code, the second detects it is reusing an IslAst that belongs to a10; different ScopInfo.11;12; int a, b, c;13;14; int main () {15;  while (a++)16;    while (b) {17;        c = 0;18;        break;19;      }20;  return 0;21; }22;23target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"24 25@a = common global i32 0, align 426@b = common global i32 0, align 427@c = common global i32 0, align 428 29; Function Attrs: nounwind uwtable30define i32 @main() {31entry:32  %retval = alloca i32, align 433  store i32 0, ptr %retval, align 434  %.pre = load i32, ptr @a, align 435  br label %while.cond36 37while.cond:                                       ; preds = %while.end, %entry38  %0 = phi i32 [ %inc, %while.end ], [ %.pre, %entry ]39  %inc = add nsw i32 %0, 140  store i32 %inc, ptr @a, align 441  %tobool = icmp ne i32 %0, 042  br i1 %tobool, label %while.body, label %while.end443 44while.body:                                       ; preds = %while.cond45  %1 = load i32, ptr @b, align 446  %tobool2 = icmp ne i32 %1, 047  br i1 %tobool2, label %while.body3, label %while.end48 49while.body3:                                      ; preds = %while.body50  store i32 0, ptr @c, align 451  br label %while.end52 53while.end:                                        ; preds = %while.body3, %while.body54  br label %while.cond55 56while.end4:                                       ; preds = %while.cond57  ret i32 058}59 60 61; CHECK: polly.start:62; CHECK-NOT: polly.start:63