
Support for vectorizing switch statements will be added in https://github.com/llvm/llvm-project/pull/99808. Update the loop to use a call that cannot be vectorized to preserve testing surfacing analysis remarks via the frontend.
15 lines
502 B
C
15 lines
502 B
C
// RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -emit-llvm -Rpass-analysis -S %s -o - 2>&1 | FileCheck %s --check-prefix=RPASS
|
|
// RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -emit-llvm -S %s -o - 2>&1 | FileCheck %s
|
|
|
|
// RPASS: {{.*}}:12:5: remark: loop not vectorized: call instruction cannot be vectorized
|
|
// CHECK-NOT: remark: loop not vectorized
|
|
|
|
void bar(void);
|
|
|
|
void foo(int N) {
|
|
#pragma clang loop vectorize(enable)
|
|
for (int i = 0; i < N; i++) {
|
|
bar();
|
|
}
|
|
}
|