diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2013-10-16 21:04:34 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2013-10-16 21:04:34 +0000 |
commit | a249914462c7b8f0c25b21eca77df264455290ee (patch) | |
tree | 5fbe997ccca041e5d0993faac291089082e73162 /test/CodeGen/AArch64/neon-scalar-abs.ll | |
parent | 700b91f07ca506f19c6d736bc020b36c678eb527 (diff) | |
download | external_llvm-a249914462c7b8f0c25b21eca77df264455290ee.zip external_llvm-a249914462c7b8f0c25b21eca77df264455290ee.tar.gz external_llvm-a249914462c7b8f0c25b21eca77df264455290ee.tar.bz2 |
[AArch64] Add support for NEON scalar absolute value instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/AArch64/neon-scalar-abs.ll')
-rw-r--r-- | test/CodeGen/AArch64/neon-scalar-abs.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/neon-scalar-abs.ll b/test/CodeGen/AArch64/neon-scalar-abs.ll index 7a1c73a..03a89e04 100644 --- a/test/CodeGen/AArch64/neon-scalar-abs.ll +++ b/test/CodeGen/AArch64/neon-scalar-abs.ll @@ -1,5 +1,17 @@ ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+neon | FileCheck %s +define i64 @test_vabsd_s64(i64 %a) { +; CHECK: test_vabsd_s64 +; CHECK: abs {{d[0-9]+}}, {{d[0-9]+}} +entry: + %vabs.i = insertelement <1 x i64> undef, i64 %a, i32 0 + %vabs1.i = tail call <1 x i64> @llvm.aarch64.neon.vabs(<1 x i64> %vabs.i) + %0 = extractelement <1 x i64> %vabs1.i, i32 0 + ret i64 %0 +} + +declare <1 x i64> @llvm.aarch64.neon.vabs(<1 x i64>) + define i8 @test_vqabsb_s8(i8 %a) { ; CHECK: test_vqabsb_s8 ; CHECK: sqabs {{b[0-9]+}}, {{b[0-9]+}} |