42 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s2; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s3 4; CHECK: Valid Region for Scop: bb10 => bb165 6; Verify that -polly-scops does not crash. At some point this piece of7; code crashed as we extracted from the SCEV expression:8;9; ((8 * ((%a * %b) + %c)) + (-8 * %a))'10;11; the constant 8, which resulted in the new expression:12;13; (((-1 + %b) * %a) + %c)14;15; which introduced a new parameter (-1 + %b) * %a which was not registered16; correctly and consequently caused a crash due to an expression not being17; registered as a parameter.18 19target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"20 21define void @barney(ptr %arg, ptr %arg1, ptr %arg2, ptr %arg3, i32 %a, i32 %b, i32 %c) {22bb:23 br label %bb1024 25bb10: ; preds = %bb26 br i1 true, label %bb11, label %bb1627 28bb11: ; preds = %bb1029 %tmp4 = add nsw i32 1, %a30 %tmp5 = sub i32 0, %tmp431 %tmp8 = add nsw i32 %c, 132 %tmp12 = mul nsw i32 %b, %a33 %tmp13 = add nsw i32 %tmp8, %tmp1234 %tmp6 = getelementptr inbounds double, ptr %arg2, i32 %tmp535 %tmp14 = getelementptr inbounds double, ptr %tmp6, i32 %tmp1336 %tmp15 = load double, ptr %tmp1437 br label %bb1638 39bb16: ; preds = %bb11, %bb1040 ret void41}42