brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · c35ed90 Raw
56 lines · plain
1; RUN: opt %loadNPMPolly -pass-remarks-analysis=polly-scops '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s --check-prefix=REMARK2; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s3;4; REMARK: remark: <unknown>:0:0: Use user assumption: [n, b] -> {  : n <= 100 or (b = 0 and n >= 101) }5;6; CHECK:       Context:7; CHECK-NEXT:    [n, b] -> {  : -9223372036854775808 <= n <= 9223372036854775807 and ((n <= 100 and -9223372036854775808 <= b <= 9223372036854775807) or (b = 0 and n >= 101)) }8; CHECK-NEXT:    Assumed Context:9; CHECK-NEXT:    [n, b] -> {  :  }10; CHECK-NEXT:    Invalid Context:11; CHECK-NEXT:    [n, b] -> {  : false }12 13;14;    void foo(float A[][100], long b, long n) {15;      for (long i = 0; i < n; i++)16;        if (b)17;          A[42][i] = 42.0;18;    }19;20target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"21 22@.src = private unnamed_addr constant [12 x i8] c"/tmp/test.c\00", align 123@0 = private unnamed_addr constant { i16, i16, [14 x i8] } { i16 -1, i16 0, [14 x i8] c"'float [100]'\00" }24@1 = private unnamed_addr constant { i16, i16, [7 x i8] } { i16 0, i16 13, [7 x i8] c"'long'\00" }25 26define void @foo(ptr %A, i64 %b, i64 %n) {27entry:28  br label %for.cond29 30for.cond:                                         ; preds = %for.inc, %entry31  %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]32  %cmp = icmp slt i64 %i.0, %n33  br i1 %cmp, label %if.cond, label %for.end34 35if.cond:36  %bcmp = icmp ne i64 %b, 037  br i1 %bcmp, label %for.body, label %for.inc38 39for.body:                                         ; preds = %for.cond40  %tmp = icmp slt i64 %i.0, 10041  call void @llvm.assume(i1 %tmp)42  %arrayidx1 = getelementptr inbounds [100 x float], ptr %A, i64 42, i64 %i.043  store float 4.200000e+01, ptr %arrayidx1, align 444  br label %for.inc45 46for.inc:                                          ; preds = %for.body47  %inc = add nuw nsw i64 %i.0, 148  br label %for.cond49 50for.end:                                          ; preds = %for.cond51  ret void52}53 54declare void @llvm.assume(i1) #155 56