brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 43b7055 Raw
50 lines · c
1// RUN: %clang_cc1 -fno-builtin -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-YES %s2// RUN: %clang_cc1 -fno-builtin-crealf -fno-builtin-creal -fno-builtin-creall \3// RUN:  -fno-builtin-cimagf  -fno-builtin-cimag -fno-builtin-cimagl -emit-llvm \4// RUN:  -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-YES %s5// RUN: %clang_cc1 -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-NO %s6 7extern float crealf(float _Complex);8extern double creal(double _Complex);9extern long double creall(long double _Complex);10 11extern float cimagf(float _Complex);12extern double cimag(double _Complex);13extern long double cimagl(long double _Complex);14 15double test_creal(double _Complex z) {16  return creal(z);17  // CHECK-NO-NOT: call double @creal18  // CHECK-YES: call double @creal19}20 21long double test_creall(double _Complex z) {22  return creall(z);23  // CHECK-NO-NOT: call x86_fp80 @creall24  // CHECK-YES: call x86_fp80 @creall25}26 27float test_crealf(double _Complex z) {28  return crealf(z);29  // CHECK-NO-NOT: call float @crealf30  // CHECK-YES: call float @crealf31}32 33double test_cimag(double _Complex z) {34  return cimag(z);35  // CHECK-NO-NOT: call double @cimag36  // CHECK-YES: call double @cimag37}38 39long double test_cimagl(double _Complex z) {40  return cimagl(z);41  // CHECK-NO-NOT: call x86_fp80 @cimagl42  // CHECK-YES: call x86_fp80 @cimagl43}44 45float test_cimagf(double _Complex z) {46  return cimagf(z);47  // CHECK-NO-NOT: call float @cimagf48  // CHECK-YES: call float @cimagf49}50