diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-12-01 03:06:07 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-12-01 03:06:07 +0000 |
commit | 5f1f4773d95560b68a9c75856563e45e3a4d57e3 (patch) | |
tree | a0e8b18166512320ab6c4f8eca6b98a2edf82dbf /test/CodeGen/AArch64 | |
parent | 2527bdac885f5822bb2b9a805fc9d80b35dd8f8b (diff) | |
download | external_llvm-5f1f4773d95560b68a9c75856563e45e3a4d57e3.zip external_llvm-5f1f4773d95560b68a9c75856563e45e3a4d57e3.tar.gz external_llvm-5f1f4773d95560b68a9c75856563e45e3a4d57e3.tar.bz2 |
Merging r195803:
------------------------------------------------------------------------
r195803 | mcrosier | 2013-11-26 17:45:58 -0800 (Tue, 26 Nov 2013) | 1 line
[AArch64] Add support for NEON scalar floating-point absolute difference.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/AArch64')
-rw-r--r-- | test/CodeGen/AArch64/neon-scalar-fabd.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/neon-scalar-fabd.ll b/test/CodeGen/AArch64/neon-scalar-fabd.ll new file mode 100644 index 0000000..75686d3 --- /dev/null +++ b/test/CodeGen/AArch64/neon-scalar-fabd.ll @@ -0,0 +1,26 @@ +; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+neon | FileCheck %s + +define float @test_vabds_f32(float %a, float %b) { +; CHECK-LABEL: test_vabds_f32 +; CHECK: fabd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}} +entry: + %vabd.i = insertelement <1 x float> undef, float %a, i32 0 + %vabd1.i = insertelement <1 x float> undef, float %b, i32 0 + %vabd2.i = call <1 x float> @llvm.aarch64.neon.vabd.v1f32(<1 x float> %vabd.i, <1 x float> %vabd1.i) + %0 = extractelement <1 x float> %vabd2.i, i32 0 + ret float %0 +} + +define double @test_vabdd_f64(double %a, double %b) { +; CHECK-LABEL: test_vabdd_f64 +; CHECK: fabd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}} +entry: + %vabd.i = insertelement <1 x double> undef, double %a, i32 0 + %vabd1.i = insertelement <1 x double> undef, double %b, i32 0 + %vabd2.i = call <1 x double> @llvm.aarch64.neon.vabd.v1f64(<1 x double> %vabd.i, <1 x double> %vabd1.i) + %0 = extractelement <1 x double> %vabd2.i, i32 0 + ret double %0 +} + +declare <1 x double> @llvm.aarch64.neon.vabd.v1f64(<1 x double>, <1 x double>) +declare <1 x float> @llvm.aarch64.neon.vabd.v1f32(<1 x float>, <1 x float>) |