50 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s2 3; CHECK: Valid Region for Scop: bb11 => bb254 5; Ensure that this test case does not trigger an assertion. At some point,6; we asserted on scops containing accesses where the access function contained7; an AddRec expression with a non-constant step expression. This got missed, as8; this very specific pattern does not seem too common. Even in this test case,9; it disappears as soon as we turn the infinite loop into a finite loop.10 11target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"12target triple = "x86_64-unknown-linux-gnu"13 14define void @hoge() local_unnamed_addr {15bb:16 %tmp = alloca [18 x [16 x i32]]17 %tmp1 = alloca [17 x i32]18 br label %bb219 20bb2:21 %tmp3 = phi i64 [ 0, %bb ], [ %tmp5, %bb2 ]22 %tmp4 = add nuw nsw i64 %tmp3, 223 %tmp5 = add nuw nsw i64 %tmp3, 124 br i1 undef, label %bb2, label %bb1125 26bb11:27 %tmp12 = phi i64 [ %tmp23, %bb24 ], [ 1, %bb2 ]28 %tmp14 = getelementptr inbounds [17 x i32], ptr %tmp1, i64 0, i64 129 br label %bb1530 31bb15:32 %tmp16 = sub nsw i64 %tmp12, 133 %tmp17 = shl i64 %tmp16, 3234 %tmp18 = ashr exact i64 %tmp17, 3235 %tmp19 = getelementptr inbounds [18 x [16 x i32]], ptr %tmp, i64 0, i64 %tmp4, i64 %tmp1836 %tmp20 = load i32, ptr %tmp19, align 437 store i32 4, ptr %tmp1938 br label %bb2139 40bb21:41 %tmp23 = add nuw nsw i64 %tmp12, 142 br i1 true, label %bb24, label %bb2543 44bb24:45 br label %bb1146 47bb25:48 ret void49}50