blob: 33cc9e015a8ff0c80437ce19a9b20fe371ce8f86 [file] [log] [blame]
Tyler Nowicki8a0925c2015-08-10 19:56:40 +00001// RUN: %clang -O1 -fvectorize -Rpass-analysis=loop-vectorize -emit-llvm -S %s -o - 2>&1 | FileCheck %s
2
3// CHECK: {{.*}}:9:11: remark: loop not vectorized: vectorization requires changes in the order of operations, however IEEE 754 floating-point operations are not commutative; allow commutativity by specifying ‘#pragma clang loop vectorize(enable)’ before the loop or by providing the compiler option ‘-ffast-math’
4
5double foo(int N) {
6 double v = 0.0;
7
8 for (int i = 0; i < N; i++)
9 v = v + 1.0;
10
11 return v;
12}