blob: 230b20c2c38f61cbe4c00ea905ed2abb0c1a071e [file] [log] [blame]
Tobias Grosserd1e33e72015-02-19 05:31:07 +00001; RUN: opt %loadPolly -polly-detect-unprofitable -polly-detect-scops-in-regions-without-loops -polly-detect-scops-in-functions-without-loops -polly-detect -analyze < %s | FileCheck %s
2; RUN: opt %loadPolly -polly-detect-unprofitable -polly-detect-scops-in-regions-without-loops -polly-detect-scops-in-functions-without-loops -polly-detect -analyze < %s | FileCheck %s
Tobias Grosserecb50922013-04-10 07:42:28 +00003
4
5; foo(float *A, long n, long k) {
6; if (true)
7; A[n * k] = 0;
8; }
9target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
10target triple = "x86_64-unknown-linux-gnu"
11
12define void @foo(float* %A, i64 %n, i64 %k) {
13entry:
14 br label %for.j
15
16for.j:
17 br i1 true, label %if.then, label %return
18
19if.then:
20 %mul = mul nsw i64 %n, %k
David Blaikiebad3ff22015-02-27 19:20:19 +000021 %arrayidx = getelementptr float, float* %A, i64 %mul
Tobias Grosserecb50922013-04-10 07:42:28 +000022 store float 0.000000e+00, float* %arrayidx
23 br label %return
24
25return:
26 ret void
27}
28
29; CHECK: Valid Region for Scop: for.j => return