summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/complex-math.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-10-11 09:24:41 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-10-11 09:24:41 +0000
commit686de24128d5abf2c2bde4a99c6639c98f8ec7f0 (patch)
tree0dc1b1b7114533a0528784db24fdb9112b943a57 /clang/test/CodeGen/complex-math.c
parentec8e838baadcb55b6986c908cb593d6fd37752b1 (diff)
downloadbcm5719-llvm-686de24128d5abf2c2bde4a99c6639c98f8ec7f0.tar.gz
bcm5719-llvm-686de24128d5abf2c2bde4a99c6639c98f8ec7f0.zip
[complex] Use the much more powerful EmitCall routine to call libcalls
for complex math. This should fix the windows build bots that started having trouble here and generally fix complex libcall emission on targets which use sret for complex data types. It also makes the code a bit simpler (despite calling into a much more complex bucket of code). llvm-svn: 219565
Diffstat (limited to 'clang/test/CodeGen/complex-math.c')
-rw-r--r--clang/test/CodeGen/complex-math.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/clang/test/CodeGen/complex-math.c b/clang/test/CodeGen/complex-math.c
index a0ac6ecec3b..ca04e8d94d1 100644
--- a/clang/test/CodeGen/complex-math.c
+++ b/clang/test/CodeGen/complex-math.c
@@ -1,4 +1,6 @@
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=X86
+// RUN: %clang_cc1 %s -O1 -emit-llvm -triple x86_64-pc-win64 -o - | FileCheck %s --check-prefix=X86
+// RUN: %clang_cc1 %s -O1 -emit-llvm -triple i686-unknown-unknown -o - | FileCheck %s --check-prefix=X86
float _Complex add_float_rr(float a, float b) {
// X86-LABEL: @add_float_rr(
@@ -87,7 +89,7 @@ float _Complex mul_float_rc(float a, float _Complex b) {
float _Complex mul_float_cc(float _Complex a, float _Complex b) {
// X86-LABEL: @mul_float_cc(
// X86-NOT: fmul
- // X86: call <2 x float> @__mulsc3(
+ // X86: call {{.*}} @__mulsc3(
// X86: ret
return a * b;
}
@@ -110,14 +112,14 @@ float _Complex div_float_cr(float _Complex a, float b) {
float _Complex div_float_rc(float a, float _Complex b) {
// X86-LABEL: @div_float_rc(
// X86-NOT: fdiv
- // X86: call <2 x float> @__divsc3(
+ // X86: call {{.*}} @__divsc3(
// X86: ret
return a / b;
}
float _Complex div_float_cc(float _Complex a, float _Complex b) {
// X86-LABEL: @div_float_cc(
// X86-NOT: fdiv
- // X86: call <2 x float> @__divsc3(
+ // X86: call {{.*}} @__divsc3(
// X86: ret
return a / b;
}
@@ -209,7 +211,7 @@ double _Complex mul_double_rc(double a, double _Complex b) {
double _Complex mul_double_cc(double _Complex a, double _Complex b) {
// X86-LABEL: @mul_double_cc(
// X86-NOT: fmul
- // X86: call { double, double } @__muldc3(
+ // X86: call {{.*}} @__muldc3(
// X86: ret
return a * b;
}
@@ -232,14 +234,14 @@ double _Complex div_double_cr(double _Complex a, double b) {
double _Complex div_double_rc(double a, double _Complex b) {
// X86-LABEL: @div_double_rc(
// X86-NOT: fdiv
- // X86: call { double, double } @__divdc3(
+ // X86: call {{.*}} @__divdc3(
// X86: ret
return a / b;
}
double _Complex div_double_cc(double _Complex a, double _Complex b) {
// X86-LABEL: @div_double_cc(
// X86-NOT: fdiv
- // X86: call { double, double } @__divdc3(
+ // X86: call {{.*}} @__divdc3(
// X86: ret
return a / b;
}
@@ -331,7 +333,7 @@ long double _Complex mul_long_double_rc(long double a, long double _Complex b) {
long double _Complex mul_long_double_cc(long double _Complex a, long double _Complex b) {
// X86-LABEL: @mul_long_double_cc(
// X86-NOT: fmul
- // X86: call { x86_fp80, x86_fp80 } @__mulxc3(
+ // X86: call {{.*}} @__mulxc3(
// X86: ret
return a * b;
}
@@ -354,14 +356,14 @@ long double _Complex div_long_double_cr(long double _Complex a, long double b) {
long double _Complex div_long_double_rc(long double a, long double _Complex b) {
// X86-LABEL: @div_long_double_rc(
// X86-NOT: fdiv
- // X86: call { x86_fp80, x86_fp80 } @__divxc3(
+ // X86: call {{.*}} @__divxc3(
// X86: ret
return a / b;
}
long double _Complex div_long_double_cc(long double _Complex a, long double _Complex b) {
// X86-LABEL: @div_long_double_cc(
// X86-NOT: fdiv
- // X86: call { x86_fp80, x86_fp80 } @__divxc3(
+ // X86: call {{.*}} @__divxc3(
// X86: ret
return a / b;
}
OpenPOWER on IntegriCloud