Skip to content

Commit

Permalink
[CodeGen] add tests for __builtin_sqrt*; NFC
Browse files Browse the repository at this point in the history
I don't know if this is correct, but this is what we currently do.
More discussion in PR27108 and PR27435 and D27618.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316250 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rotateright committed Oct 20, 2017
1 parent 4290aec commit 0e806a8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/CodeGen/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,15 @@ void test_float_builtin_ops(float F, double D, long double LD) {
resld = __builtin_floorl(LD);
// CHECK: call x86_fp80 @llvm.floor.f80

resf = __builtin_sqrtf(F);
// CHECK: call float @sqrtf(

resd = __builtin_sqrt(D);
// CHECK: call double @sqrt(

resld = __builtin_sqrtl(LD);
// CHECK: call x86_fp80 @sqrtl(

resf = __builtin_truncf(F);
// CHECK: call float @llvm.trunc.f32

Expand Down

0 comments on commit 0e806a8

Please sign in to comment.