brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · fa5d6fc Raw
88 lines · cpp
1// RUN: %clang_cc1 -E -dM -triple=x86_64-none-none  %s -o - \2// RUN:   | FileCheck %s -strict-whitespace3 4// RUN: %clang_cc1 -E -dM -triple=x86_64-none-none -target-feature -sse \5// RUN:   %s -o - | FileCheck %s -check-prefix=EXT -strict-whitespace6 7// RUN: %clang_cc1 -E -dM -triple=arm64e-apple-ios -target-feature -sse \8// RUN:   %s -o - | FileCheck %s  -strict-whitespace9 10// RUN: %clang_cc1 -E -dM -triple=arm64e-apple-ios -target-feature +sse \11// RUN:   %s -o - | FileCheck %s  -strict-whitespace12 13// RUN: %clang_cc1 -E -dM -triple=arm64_32-apple-ios  %s -o - \14// RUN:   | FileCheck %s  -strict-whitespace15 16// RUN: %clang_cc1 -E -dM -triple=arm64_32-apple-ios -target-feature -sse \17// RUN:   %s -o - | FileCheck %s  -strict-whitespace18 19// RUN: %clang_cc1 -E -dM -triple=x86_64-apple-macos13.0 -ffast-math \20// RUN:   %s -o - | FileCheck %s -check-prefix=CHECK -strict-whitespace21 22// RUN: %clang_cc1 -E -dM -triple i386-pc-windows -target-cpu pentium4 %s -o - \23// RUN:   | FileCheck %s  -strict-whitespace24 25// RUN: %clang_cc1 -E -dM -triple i386-pc-windows -target-cpu pentium4 \26// RUN:   -target-feature -sse %s -o - | FileCheck -check-prefix=EXT %s \27// RUN:   -strict-whitespace28 29#ifdef __FLT_EVAL_METHOD__30#if __FLT_EVAL_METHOD__ == 331#define __GLIBC_FLT_EVAL_METHOD 232#else33#define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__34#endif35#elif defined __x86_64__36#define __GLIBC_FLT_EVAL_METHOD 037#else38#define __GLIBC_FLT_EVAL_METHOD 239#endif40 41#if __GLIBC_FLT_EVAL_METHOD == -142#define Name "MinusOne"43#elif __GLIBC_FLT_EVAL_METHOD == 0 || __GLIBC_FLT_EVAL_METHOD == 1644#define Name "One"45#elif __GLIBC_FLT_EVAL_METHOD == 146#define Name "Two"47#elif __GLIBC_FLT_EVAL_METHOD == 248#define Name "Three"49#elif __GLIBC_FLT_EVAL_METHOD == 3250#define Name "Four"51#elif __GLIBC_FLT_EVAL_METHOD == 3352#define Name "Five"53#elif __GLIBC_FLT_EVAL_METHOD == 6454#define Name "Six"55#elif __GLIBC_FLT_EVAL_METHOD == 6556#define Name "Seven"57#elif __GLIBC_FLT_EVAL_METHOD == 12858#define Name "Eight"59#elif __GLIBC_FLT_EVAL_METHOD == 12960#define Name "Nine"61#else62#error "Unknown __GLIBC_FLT_EVAL_METHOD"63#endif64 65int foo() {66  // CHECK: #define Name "One"67  // EXT: #define Name "Three"68  return Name;69}70 71#pragma fp eval_method(double)72 73#if __FLT_EVAL_METHOD__ == 374#define Val "Unset"75#elif __FLT_EVAL_METHOD__ == 076#define Val "val0"77#elif __FLT_EVAL_METHOD__ == 178#define Val "val1"79#elif __FLT_EVAL_METHOD__ == 280#define Val "val2"81#endif82 83int goo() {84  // CHECK: #define Val "val0"85  // EXT: #define Val "val2"86  return Val;87}88