brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 4522716 Raw
72 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<ast>' -polly-print-ast -disable-output < %s | FileCheck %s2; XFAIL: *3 4;#include "limits.h"5;#define N 206;7;int main () {8;  unsigned long long i;9;  unsigned long long A[N];10;11;  A[0] = 0;12;13;  __sync_synchronize();14;15;  for (i = 0; i < ULLONG_MAX; i++)16;    A[0] = i;17;18;  __sync_synchronize();19;20;  if (A[0] == ULLONG_MAX - 1)21;    return 0;22;  else23;    return 1;24;}25 26target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"27 28define i32 @main() nounwind {29entry:30  %A = alloca [20 x i64], align 8                 ; <ptr> [#uses=3]31  %arraydecay = getelementptr inbounds [20 x i64], ptr %A, i32 0, i32 0 ; <ptr> [#uses=1]32  %arrayidx = getelementptr inbounds i64, ptr %arraydecay, i64 0 ; <ptr> [#uses=1]33  store i64 0, ptr %arrayidx34  fence seq_cst35  br label %for.cond36 37for.cond:                                         ; preds = %for.inc, %entry38  %0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]  ; <i64> [#uses=3]39  %exitcond = icmp ne i64 %0, -1                  ; <i1> [#uses=1]40  br i1 %exitcond, label %for.body, label %for.end41 42for.body:                                         ; preds = %for.cond43  %arraydecay2 = getelementptr inbounds [20 x i64], ptr %A, i32 0, i32 0 ; <ptr> [#uses=1]44  %arrayidx3 = getelementptr inbounds i64, ptr %arraydecay2, i64 0 ; <ptr> [#uses=1]45  store i64 %0, ptr %arrayidx346  br label %for.inc47 48for.inc:                                          ; preds = %for.body49  %inc = add i64 %0, 1                            ; <i64> [#uses=1]50  br label %for.cond51 52for.end:                                          ; preds = %for.cond53  fence seq_cst54  %arraydecay5 = getelementptr inbounds [20 x i64], ptr %A, i32 0, i32 0 ; <ptr> [#uses=1]55  %arrayidx6 = getelementptr inbounds i64, ptr %arraydecay5, i64 0 ; <ptr> [#uses=1]56  %tmp7 = load i64, ptr %arrayidx6                    ; <i64> [#uses=1]57  %cmp8 = icmp eq i64 %tmp7, -2                   ; <i1> [#uses=1]58  br i1 %cmp8, label %if.then, label %if.else59 60if.then:                                          ; preds = %for.end61  br label %return62 63if.else:                                          ; preds = %for.end64  br label %return65 66return:                                           ; preds = %if.else, %if.then67  %retval.0 = phi i32 [ 0, %if.then ], [ 1, %if.else ] ; <i32> [#uses=1]68  ret i32 %retval.069}70 71; CHECK:for (c2=0;72