| Tobias Grosser | d1e33e7 | 2015-02-19 05:31:07 +0000 | [diff] [blame] | 1 | ; 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 Grosser | ecb5092 | 2013-04-10 07:42:28 +0000 | [diff] [blame] | 3 | |
| 4 | |
| 5 | ; foo(float *A, long n, long k) { |
| 6 | ; if (true) |
| 7 | ; A[n * k] = 0; |
| 8 | ; } |
| 9 | target 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" |
| 10 | target triple = "x86_64-unknown-linux-gnu" |
| 11 | |
| 12 | define void @foo(float* %A, i64 %n, i64 %k) { |
| 13 | entry: |
| 14 | br label %for.j |
| 15 | |
| 16 | for.j: |
| 17 | br i1 true, label %if.then, label %return |
| 18 | |
| 19 | if.then: |
| 20 | %mul = mul nsw i64 %n, %k |
| David Blaikie | bad3ff2 | 2015-02-27 19:20:19 +0000 | [diff] [blame^] | 21 | %arrayidx = getelementptr float, float* %A, i64 %mul |
| Tobias Grosser | ecb5092 | 2013-04-10 07:42:28 +0000 | [diff] [blame] | 22 | store float 0.000000e+00, float* %arrayidx |
| 23 | br label %return |
| 24 | |
| 25 | return: |
| 26 | ret void |
| 27 | } |
| 28 | |
| 29 | ; CHECK: Valid Region for Scop: for.j => return |