brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 84222f7 Raw
60 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb '-passes=polly-custom<scops>' -polly-print-scops -debug -disable-output < %s 2>&1 | FileCheck %s2 3; REQUIRES: asserts4 5; This test case at some point crashed Polly due to a 'division by zero'6; when trying to fold the constant dimension into outer dimension.7; We verify that this scop is detected without crash. We also test the8; output to understand that the scop has been analyzed, but has also been9; invalidated due to the zero size dimension.10 11; CHECK: Assumed Context:12; CHECK-NEXT: {  : false }13; CHECK-NEXT: Invalid Context:14; CHECK-NEXT: {  : false }15; CHECK:      Arrays {16; CHECK-NEXT:     i8 MemRef_arg[*][0]; // Element size 117; CHECK-NEXT: }18; CHECK-NEXT: Arrays (Bounds as pw_affs) {19; CHECK-NEXT:     i8 MemRef_arg[*][ { [] -> [(0)] } ]; // Element size 120; CHECK-NEXT: }21; CHECK-NEXT: Alias Groups (0):22; CHECK-NEXT:     n/a23; CHECK-NEXT: Statements {24; CHECK-NEXT: 	Stmt_bb225; CHECK-NEXT:         Domain :=26; CHECK-NEXT:             { Stmt_bb2[] };27; CHECK-NEXT:         Schedule :=28; CHECK-NEXT:             { Stmt_bb2[] -> [] };29; CHECK-NEXT:         MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]30; CHECK-NEXT:             { Stmt_bb2[] -> MemRef_arg[0, 0] };31; CHECK-NEXT:         MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]32; CHECK-NEXT:             { Stmt_bb2[] -> MemRef_arg[o0, o1] : false };33; CHECK-NEXT: }34 35target datalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"36 37declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i32, i1) #038 39define void @hoge([0 x [0 x i8]]* noalias %arg) {40bb:41  br label %bb142 43bb1:                                              ; preds = %bb5, %bb44  br i1 false, label %bb5, label %bb245 46bb2:                                              ; preds = %bb147  %tmp = getelementptr [0 x [0 x i8]], [0 x [0 x i8]]* %arg, i64 0, i64 0, i64 048  store i8 32, i8* %tmp, align 149  %tmp3 = getelementptr [0 x [0 x i8]], [0 x [0 x i8]]* %arg, i64 0, i64 0, i64 050  %tmp4 = getelementptr i8, i8* %tmp3, i64 151  tail call void @llvm.memset.p0i8.i64(i8* %tmp4, i8 32, i64 0, i32 1, i1 false)52  br label %bb553 54bb5:                                              ; preds = %bb2, %bb155  br i1 undef, label %bb6, label %bb156 57bb6:                                              ; preds = %bb558  ret void59}60