| 1 |
; RUN: llc -mtriple=xcore-unknown-unknown < %s | FileCheck %s |
| 2 |
|
| 3 |
; CHECK-LABEL: test_sincos_f16: |
| 4 |
; CHECK: bl __extendhfsf2 |
| 5 |
; CHECK: bl sinf |
| 6 |
; CHECK: bl __truncsfhf2 |
| 7 |
; CHECK: bl cosf |
| 8 |
; CHECK: bl __truncsfhf2 |
| 9 |
define { half, half } @test_sincos_f16(half %a) nounwind { |
| 10 |
%result = call { half, half } @llvm.sincos.f16(half %a) |
| 11 |
ret { half, half } %result |
| 12 |
} |
| 13 |
|
| 14 |
; CHECK-LABEL: test_sincos_v2f16: |
| 15 |
; CHECK: bl __extendhfsf2 |
| 16 |
; CHECK: bl sinf |
| 17 |
; CHECK: bl __truncsfhf2 |
| 18 |
; CHECK: bl __extendhfsf2 |
| 19 |
; CHECK: bl sinf |
| 20 |
; CHECK: bl __truncsfhf2 |
| 21 |
; CHECK: bl cosf |
| 22 |
; CHECK: bl __truncsfhf2 |
| 23 |
; CHECK: bl cosf |
| 24 |
; CHECK: bl __truncsfhf2 |
| 25 |
define { <2 x half>, <2 x half> } @test_sincos_v2f16(<2 x half> %a) nounwind { |
| 26 |
%result = call { <2 x half>, <2 x half> } @llvm.sincos.v2f16(<2 x half> %a) |
| 27 |
ret { <2 x half>, <2 x half> } %result |
| 28 |
} |
| 29 |
|
| 30 |
; CHECK-LABEL: test_sincos_f32: |
| 31 |
; CHECK: bl sinf |
| 32 |
; CHECK: bl cosf |
| 33 |
define { float, float } @test_sincos_f32(float %a) nounwind { |
| 34 |
%result = call { float, float } @llvm.sincos.f32(float %a) |
| 35 |
ret { float, float } %result |
| 36 |
} |
| 37 |
|
| 38 |
; CHECK-LABEL: test_sincos_v2f32: |
| 39 |
; CHECK: bl sinf |
| 40 |
; CHECK: bl sinf |
| 41 |
; CHECK: bl cosf |
| 42 |
; CHECK: bl cosf |
| 43 |
define { <2 x float>, <2 x float> } @test_sincos_v2f32(<2 x float> %a) nounwind { |
| 44 |
%result = call { <2 x float>, <2 x float> } @llvm.sincos.v2f32(<2 x float> %a) |
| 45 |
ret { <2 x float>, <2 x float> } %result |
| 46 |
} |
| 47 |
|
| 48 |
; CHECK-LABEL: test_sincos_f64: |
| 49 |
; CHECK: bl sin |
| 50 |
; CHECK: bl cos |
| 51 |
define { double, double } @test_sincos_f64(double %a) nounwind { |
| 52 |
%result = call { double, double } @llvm.sincos.f64(double %a) |
| 53 |
ret { double, double } %result |
| 54 |
} |
| 55 |
|
| 56 |
; CHECK-LABEL: test_sincos_v2f64: |
| 57 |
; CHECK: bl sin |
| 58 |
; CHECK: bl sin |
| 59 |
; CHECK: bl cos |
| 60 |
; CHECK: bl cos |
| 61 |
define { <2 x double>, <2 x double> } @test_sincos_v2f64(<2 x double> %a) nounwind { |
| 62 |
%result = call { <2 x double>, <2 x double> } @llvm.sincos.v2f64(<2 x double> %a) |
| 63 |
ret { <2 x double>, <2 x double> } %result |
| 64 |
} |
| 65 |
|
| 66 |
; CHECK-LABEL: test_sincos_f128: |
| 67 |
; CHECK: bl sinl |
| 68 |
; CHECK: bl cosl |
| 69 |
define { fp128, fp128 } @test_sincos_f128(fp128 %a) nounwind { |
| 70 |
%result = call { fp128, fp128 } @llvm.sincos.f128(fp128 %a) |
| 71 |
ret { fp128, fp128 } %result |
| 72 |
} |
| 73 |
|
| 74 |
; CHECK-LABEL: test_sincos_v2f128: |
| 75 |
; CHECK: bl sinl |
| 76 |
; CHECK: bl cosl |
| 77 |
; CHECK: bl cosl |
| 78 |
; CHECK: bl sinl |
| 79 |
define { <2 x fp128>, <2 x fp128> } @test_sincos_v2f128(<2 x fp128> %a) nounwind { |
| 80 |
%result = call { <2 x fp128>, <2 x fp128> } @llvm.sincos.v2f128(<2 x fp128> %a) |
| 81 |
ret { <2 x fp128>, <2 x fp128> } %result |
| 82 |
} |