brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 7b7b14d Raw
85 lines · c
1////2//// Verify that valid options for the -mrecip flag are passed through and invalid options cause an error.3////4 5//// If there are no options, convert to 'all'.6 7// RUN: %clang -### -S %s -mrecip  2>&1 | FileCheck --check-prefix=RECIP0 %s8// RECIP0: "-mrecip=all"9 10//// Check options that cover all types.11 12// RUN: %clang -### -S %s -mrecip=all  2>&1 | FileCheck --check-prefix=RECIP1 %s13// RECIP1: "-mrecip=all"14 15// RUN: %clang -### -S %s -mrecip=default  2>&1 | FileCheck --check-prefix=RECIP2 %s16// RECIP2: "-mrecip=default"17 18// RUN: %clang -### -S %s -mrecip=none  2>&1 | FileCheck --check-prefix=RECIP3 %s19// RECIP3: "-mrecip=none"20 21//// Check options that do not specify float or double.22 23// RUN: %clang -### -S %s -mrecip=vec-sqrt  2>&1 | FileCheck --check-prefix=RECIP4 %s24// RECIP4: "-mrecip=vec-sqrt"25 26// RUN: %clang -### -S %s -mrecip=!div,vec-div  2>&1 | FileCheck --check-prefix=RECIP5 %s27// RECIP5: "-mrecip=!div,vec-div"28 29//// Check individual option types.30 31// RUN: %clang -### -S %s -mrecip=vec-sqrtd  2>&1 | FileCheck --check-prefix=RECIP6 %s32// RECIP6: "-mrecip=vec-sqrtd"33 34// RUN: %clang -### -S %s -mrecip=!divf  2>&1 | FileCheck --check-prefix=RECIP7 %s35// RECIP7: "-mrecip=!divf"36 37// RUN: %clang -### -S %s -mrecip=divf,sqrtd,vec-divd,vec-sqrtf  2>&1 | FileCheck --check-prefix=RECIP8 %s38// RECIP8: "-mrecip=divf,sqrtd,vec-divd,vec-sqrtf"39 40// RUN: %clang -### -S %s -mrecip=vec-sqrth  2>&1 | FileCheck --check-prefix=RECIP18 %s41// RECIP18: "-mrecip=vec-sqrth"42 43//// Check optional refinement step specifiers.44 45// RUN: %clang -### -S %s -mrecip=all:1  2>&1 | FileCheck --check-prefix=RECIP9 %s46// RECIP9: "-mrecip=all:1"47 48// RUN: %clang -### -S %s -mrecip=sqrtf:3  2>&1 | FileCheck --check-prefix=RECIP10 %s49// RECIP10: "-mrecip=sqrtf:3"50 51// RUN: %clang -### -S %s -mrecip=div:5  2>&1 | FileCheck --check-prefix=RECIP11 %s52// RECIP11: "-mrecip=div:5"53 54// RUN: %clang -### -S %s -mrecip=divd:1,!sqrtf:2,vec-divf:9,vec-sqrtd:0  2>&1 | FileCheck --check-prefix=RECIP12 %s55// RECIP12: "-mrecip=divd:1,!sqrtf:2,vec-divf:9,vec-sqrtd:0"56 57// RUN: %clang -### -S %s -mrecip=sqrth:2  2>&1 | FileCheck --check-prefix=RECIP19 %s58// RECIP19: "-mrecip=sqrth:2"59 60//// Check invalid parameters.61 62// RUN: not %clang -### -S %s -mrecip=bogus  2>&1 | FileCheck --check-prefix=RECIP13 %s63// RECIP13: error: unknown argument64 65// RUN: not %clang -### -S %s -mrecip=divd:1,divd  2>&1 | FileCheck --check-prefix=RECIP14 %s66// RECIP14: error: invalid value 67 68// RUN: not %clang -### -S %s -mrecip=sqrt,sqrtf  2>&1 | FileCheck --check-prefix=RECIP15 %s69// RECIP15: error: invalid value 70 71// RUN: not %clang -### -S %s -mrecip=+default:10  2>&1 | FileCheck --check-prefix=RECIP16 %s72// RECIP16: error: invalid value 73 74// RUN: not %clang -### -S %s -mrecip=!vec-divd:  2>&1 | FileCheck --check-prefix=RECIP17 %s75// RECIP17: error: invalid value 76 77// RUN: not %clang -### -S %s -mrecip=divh:1,divh  2>&1 | FileCheck --check-prefix=RECIP20 %s78// RECIP20: error: invalid value 79 80// RUN: not %clang -### -S %s -mrecip=divh,div  2>&1 | FileCheck --check-prefix=RECIP21 %s81// RECIP21: error: invalid value 82 83// RUN: not %clang -### -S %s -mrecip=sqrt,sqrth  2>&1 | FileCheck --check-prefix=RECIP22 %s84// RECIP22: error: invalid value 85