diff options
author | Tim Northover <Tim.Northover@arm.com> | 2013-03-08 13:55:07 +0000 |
---|---|---|
committer | Tim Northover <Tim.Northover@arm.com> | 2013-03-08 13:55:07 +0000 |
commit | 69fe178f7781fa3c01d013ac7b7858926064f6ca (patch) | |
tree | c09bce3db11f72ce04647e35c554843b9be245ab /test/CodeGen/AArch64 | |
parent | d787c047bcc5d0d81743f9d4403d5c54fe4757fe (diff) | |
download | llvm-69fe178f7781fa3c01d013ac7b7858926064f6ca.tar.gz llvm-69fe178f7781fa3c01d013ac7b7858926064f6ca.tar.bz2 llvm-69fe178f7781fa3c01d013ac7b7858926064f6ca.tar.xz |
AArch64: expand sincos operations, we don't support them.
Patch based on Mans Rullgard's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/AArch64')
-rw-r--r-- | test/CodeGen/AArch64/sincos-expansion.ll | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/sincos-expansion.ll b/test/CodeGen/AArch64/sincos-expansion.ll new file mode 100644 index 0000000000..550bc8de60 --- /dev/null +++ b/test/CodeGen/AArch64/sincos-expansion.ll @@ -0,0 +1,35 @@ +; RUN: llc -march=aarch64 -verify-machineinstrs < %s | FileCheck %s + +define float @test_sincos_f32(float %f) { + %sin = call float @sinf(float %f) readnone + %cos = call float @cosf(float %f) readnone +; CHECK: bl cosf +; CHECK: bl sinf + %val = fadd float %sin, %cos + ret float %val +} + +define double @test_sincos_f64(double %f) { + %sin = call double @sin(double %f) readnone + %cos = call double @cos(double %f) readnone + %val = fadd double %sin, %cos +; CHECK: bl cos +; CHECK: bl sin + ret double %val +} + +define fp128 @test_sincos_f128(fp128 %f) { + %sin = call fp128 @sinl(fp128 %f) readnone + %cos = call fp128 @cosl(fp128 %f) readnone + %val = fadd fp128 %sin, %cos +; CHECK: bl cosl +; CHECK: bl sinl + ret fp128 %val +} + +declare float @sinf(float) readonly +declare double @sin(double) readonly +declare fp128 @sinl(fp128) readonly +declare float @cosf(float) readonly +declare double @cos(double) readonly +declare fp128 @cosl(fp128) readonly
\ No newline at end of file |