[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / libcalls-complex.c
blob43b70550d8b43a2307b89b1aebf623989f008472
1 // RUN: %clang_cc1 -fno-builtin -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-YES %s
2 // 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 %s
5 // RUN: %clang_cc1 -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-NO %s
7 extern float crealf(float _Complex);
8 extern double creal(double _Complex);
9 extern long double creall(long double _Complex);
11 extern float cimagf(float _Complex);
12 extern double cimag(double _Complex);
13 extern long double cimagl(long double _Complex);
15 double test_creal(double _Complex z) {
16 return creal(z);
17 // CHECK-NO-NOT: call double @creal
18 // CHECK-YES: call double @creal
21 long double test_creall(double _Complex z) {
22 return creall(z);
23 // CHECK-NO-NOT: call x86_fp80 @creall
24 // CHECK-YES: call x86_fp80 @creall
27 float test_crealf(double _Complex z) {
28 return crealf(z);
29 // CHECK-NO-NOT: call float @crealf
30 // CHECK-YES: call float @crealf
33 double test_cimag(double _Complex z) {
34 return cimag(z);
35 // CHECK-NO-NOT: call double @cimag
36 // CHECK-YES: call double @cimag
39 long double test_cimagl(double _Complex z) {
40 return cimagl(z);
41 // CHECK-NO-NOT: call x86_fp80 @cimagl
42 // CHECK-YES: call x86_fp80 @cimagl
45 float test_cimagf(double _Complex z) {
46 return cimagf(z);
47 // CHECK-NO-NOT: call float @cimagf
48 // CHECK-YES: call float @cimagf