[OpenACC] Treat 'delete' as a valid clause during parsing in C++ mode
[llvm-project.git] / clang / test / Driver / mrecip.c
blob7b7b14dba401a17635312cc712eb8f177fadf72a
1 ////
2 //// Verify that valid options for the -mrecip flag are passed through and invalid options cause an error.
3 ////
5 //// If there are no options, convert to 'all'.
7 // RUN: %clang -### -S %s -mrecip 2>&1 | FileCheck --check-prefix=RECIP0 %s
8 // RECIP0: "-mrecip=all"
10 //// Check options that cover all types.
12 // RUN: %clang -### -S %s -mrecip=all 2>&1 | FileCheck --check-prefix=RECIP1 %s
13 // RECIP1: "-mrecip=all"
15 // RUN: %clang -### -S %s -mrecip=default 2>&1 | FileCheck --check-prefix=RECIP2 %s
16 // RECIP2: "-mrecip=default"
18 // RUN: %clang -### -S %s -mrecip=none 2>&1 | FileCheck --check-prefix=RECIP3 %s
19 // RECIP3: "-mrecip=none"
21 //// Check options that do not specify float or double.
23 // RUN: %clang -### -S %s -mrecip=vec-sqrt 2>&1 | FileCheck --check-prefix=RECIP4 %s
24 // RECIP4: "-mrecip=vec-sqrt"
26 // RUN: %clang -### -S %s -mrecip=!div,vec-div 2>&1 | FileCheck --check-prefix=RECIP5 %s
27 // RECIP5: "-mrecip=!div,vec-div"
29 //// Check individual option types.
31 // RUN: %clang -### -S %s -mrecip=vec-sqrtd 2>&1 | FileCheck --check-prefix=RECIP6 %s
32 // RECIP6: "-mrecip=vec-sqrtd"
34 // RUN: %clang -### -S %s -mrecip=!divf 2>&1 | FileCheck --check-prefix=RECIP7 %s
35 // RECIP7: "-mrecip=!divf"
37 // RUN: %clang -### -S %s -mrecip=divf,sqrtd,vec-divd,vec-sqrtf 2>&1 | FileCheck --check-prefix=RECIP8 %s
38 // RECIP8: "-mrecip=divf,sqrtd,vec-divd,vec-sqrtf"
40 // RUN: %clang -### -S %s -mrecip=vec-sqrth 2>&1 | FileCheck --check-prefix=RECIP18 %s
41 // RECIP18: "-mrecip=vec-sqrth"
43 //// Check optional refinement step specifiers.
45 // RUN: %clang -### -S %s -mrecip=all:1 2>&1 | FileCheck --check-prefix=RECIP9 %s
46 // RECIP9: "-mrecip=all:1"
48 // RUN: %clang -### -S %s -mrecip=sqrtf:3 2>&1 | FileCheck --check-prefix=RECIP10 %s
49 // RECIP10: "-mrecip=sqrtf:3"
51 // RUN: %clang -### -S %s -mrecip=div:5 2>&1 | FileCheck --check-prefix=RECIP11 %s
52 // RECIP11: "-mrecip=div:5"
54 // RUN: %clang -### -S %s -mrecip=divd:1,!sqrtf:2,vec-divf:9,vec-sqrtd:0 2>&1 | FileCheck --check-prefix=RECIP12 %s
55 // RECIP12: "-mrecip=divd:1,!sqrtf:2,vec-divf:9,vec-sqrtd:0"
57 // RUN: %clang -### -S %s -mrecip=sqrth:2 2>&1 | FileCheck --check-prefix=RECIP19 %s
58 // RECIP19: "-mrecip=sqrth:2"
60 //// Check invalid parameters.
62 // RUN: not %clang -### -S %s -mrecip=bogus 2>&1 | FileCheck --check-prefix=RECIP13 %s
63 // RECIP13: error: unknown argument
65 // RUN: not %clang -### -S %s -mrecip=divd:1,divd 2>&1 | FileCheck --check-prefix=RECIP14 %s
66 // RECIP14: error: invalid value
68 // RUN: not %clang -### -S %s -mrecip=sqrt,sqrtf 2>&1 | FileCheck --check-prefix=RECIP15 %s
69 // RECIP15: error: invalid value
71 // RUN: not %clang -### -S %s -mrecip=+default:10 2>&1 | FileCheck --check-prefix=RECIP16 %s
72 // RECIP16: error: invalid value
74 // RUN: not %clang -### -S %s -mrecip=!vec-divd: 2>&1 | FileCheck --check-prefix=RECIP17 %s
75 // RECIP17: error: invalid value
77 // RUN: not %clang -### -S %s -mrecip=divh:1,divh 2>&1 | FileCheck --check-prefix=RECIP20 %s
78 // RECIP20: error: invalid value
80 // RUN: not %clang -### -S %s -mrecip=divh,div 2>&1 | FileCheck --check-prefix=RECIP21 %s
81 // RECIP21: error: invalid value
83 // RUN: not %clang -### -S %s -mrecip=sqrt,sqrth 2>&1 | FileCheck --check-prefix=RECIP22 %s
84 // RECIP22: error: invalid value