Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaOpenCL / unroll-hint.cl
blob41385c1177ca04d452dad3431c1e93d0bc6dbaa1
1 //RUN: %clang_cc1 -O0 -cl-std=CL2.0 -fsyntax-only -verify %s
3 kernel void C (global int *x) {
4 int I = 3;
5 __attribute__((opencl_unroll_hint(I))) // expected-error {{'opencl_unroll_hint' attribute requires an integer constant}}
6 while (I--);
9 kernel void E() {
10 __attribute__((opencl_unroll_hint(2,4))) // expected-error {{'opencl_unroll_hint' attribute takes no more than 1 argument}}
11 for(int i=0; i<100; i++);
14 kernel void F() {
15 __attribute__((opencl_unroll_hint(-1))) // expected-error {{'opencl_unroll_hint' attribute requires a positive integral compile time constant expression}}
16 for(int i=0; i<100; i++);