1 // RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -emit-llvm -Rpass-analysis -S %s -o - 2>&1 | FileCheck %s --check-prefix=RPASS
2 // RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -emit-llvm -S %s -o - 2>&1 | FileCheck %s
4 // RPASS: {{.*}}:12:5: remark: loop not vectorized: loop contains a switch statement
5 // CHECK-NOT: remark: loop not vectorized: loop contains a switch statement
7 double foo(int N
, int *Array
) {
10 #pragma clang loop vectorize(enable)
11 for (int i
= 0; i
< N
; i
++) {
13 case 0: v
+= 1.0f
; break;
14 case 1: v
-= 0.5f
; break;
15 case 2: v
*= 2.0f
; break;