blob: 24a1bbc38c4e4711a451a6cc328622e114049772 [file] [log] [blame]
Eli Benderskyc3496b02013-07-24 21:22:01 +00001// RUN: %clang_cc1 -fno-math-builtin -fmath-errno -emit-llvm -o - %s -triple le32-unknown-nacl | FileCheck %s
2// RUN: %clang_cc1 -fno-math-builtin -emit-llvm -o - %s -triple le32-unknown-nacl | FileCheck %s
Eli Bendersky9b64ec12013-07-03 19:19:12 +00003
Eli Benderskyc3496b02013-07-24 21:22:01 +00004// le32 (PNaCl) never generates intrinsics for pow calls, with or without
5// errno, when the -fno-math-builtin flag is passed to -cc1. A separate test
6// makes sure this flag is indeed passed for le32.
7
8float powf(float, float);
9double pow(double, double);
10long double powl(long double, long double);
Eli Bendersky9b64ec12013-07-03 19:19:12 +000011
12// CHECK: define void @test_pow
13void test_pow(float a0, double a1, long double a2) {
14 // CHECK: call float @powf
15 float l0 = powf(a0, a0);
16
17 // CHECK: call double @pow
18 double l1 = pow(a1, a1);
19
20 // CHECK: call double @powl
21 long double l2 = powl(a2, a2);
22}
23
24// CHECK: declare float @powf(float, float)
25// CHECK: declare double @pow(double, double)
26// CHECK: declare double @powl(double, double)
27