llvm-project
39 строк · 1.1 Кб
1; RUN: opt %loadNPMPolly '-passes=print<polly-detect>' -polly-detect-track-failures -disable-output -pass-remarks-missed=polly-detect < %s 2>&1 | FileCheck %s --check-prefix=REMARK
2; RUN: opt %loadNPMPolly '-passes=print<polly-detect>' -polly-detect-track-failures -disable-output -stats < %s 2>&1 | FileCheck %s --check-prefix=STAT
3; REQUIRES: asserts
4
5; REMARK: Branch from indirect terminator.
6
7; STAT: 1 polly-detect - Number of rejected regions: Branch from indirect terminator
8
9
10target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11target triple = "x86_64-unknown-linux-gnu"
12
13define void @func(i32 %n, ptr noalias nonnull %A) {
14entry:
15callbr void asm sideeffect "", "!i,~{dirflag},~{fpsr},~{flags}"() #1
16to label %fallthrough [label %for]
17
18fallthrough:
19br label %for
20
21for:
22%j = phi i32 [0, %entry], [0, %fallthrough], [%j.inc, %inc]
23%j.cmp = icmp slt i32 %j, %n
24br i1 %j.cmp, label %body, label %exit
25
26body:
27store double 42.0, ptr %A
28br label %inc
29
30inc:
31%j.inc = add nuw nsw i32 %j, 1
32br label %for
33
34exit:
35br label %return
36
37return:
38ret void
39}
40