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