llvm-project
35 строк · 1.2 Кб
1; RUN: opt %loadNPMPolly '-passes=print<polly-detect>' -disable-output < %s 2>&1 | FileCheck %s
2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3
4; CHECK: Valid Region for Scop: bb14 => bb17
5
6; Make sure we do not detect the larger region bb14->bb19 that contains
7; a multi-dimensional memory access with a size of 'undef * undef'.
8
9define void @hoge(ptr %arg) {
10bb:
11br label %bb6
12
13bb6: ; preds = %bb
14%tmp = mul i64 undef, undef
15%tmp7 = add i64 %tmp, undef
16%tmp8 = add i64 %tmp7, 0
17%tmp9 = add i64 %tmp8, 8
18%tmp10 = sub i64 %tmp9, undef
19%tmp11 = getelementptr i8, ptr %arg, i64 %tmp10
20%tmp12 = getelementptr inbounds i8, ptr %tmp11, i64 4
21%tmp13 = getelementptr inbounds i8, ptr %tmp12, i64 20
22br label %bb14
23
24bb14: ; preds = %bb14, %bb6
25%tmp15 = phi i32 [ %tmp16, %bb14 ], [ 2, %bb6 ]
26%tmp16 = add nuw nsw i32 %tmp15, 1
27br i1 false, label %bb14, label %bb17
28
29bb17: ; preds = %bb14
30store i32 undef, ptr %tmp13, align 4
31br label %bb19
32
33bb19: ; preds = %bb17
34unreachable
35}
36