From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
To: gcc Patches <gcc-patches@gcc.gnu.org>,
Kyrill Tkachov <kyrylo.tkachov@arm.com>
Subject: [PR66791][ARM] Replace __builtin_vext* with __buitlin_shuffle in vext intrinsics
Date: Mon, 4 Jan 2021 15:57:22 +0530 [thread overview]
Message-ID: <CAAgBjMmmO7ya=uOg0n_vJM8HXEN3DEJh4OpUHO5bhnng0Cv1QA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
Hi Kyrill,
The attached patch replaces __builtin_vextv8qi with __builtin_shuffle
for vext_s8.
Just wanted to confirm if this is in the correct direction ?
If yes, I will send a follow up patch that converts for all vext intrinsics.
Thanks,
Prathamesh
[-- Attachment #2: vext-1.diff --]
[-- Type: application/octet-stream, Size: 727 bytes --]
diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index 3efcfa45229..dee805ba273 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -8733,7 +8733,12 @@ __extension__ extern __inline int8x8_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vext_s8 (int8x8_t __a, int8x8_t __b, const int __c)
{
- return (int8x8_t)__builtin_neon_vextv8qi (__a, __b, __c);
+#ifdef __ARMEB__
+ return __builtin_shuffle (__b, __a, (uint8x8_t)
+ {8-__c, 9-__c, 10-__c, 11-__c, 12-__c, 13-__c, 14-__c, 15-__c});
+#else
+ return __builtin_shuffle (__a, __b, (uint8x8_t)
+ {__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7});
}
__extension__ extern __inline int16x4_t
next reply other threads:[~2021-01-04 10:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 10:27 Prathamesh Kulkarni [this message]
2021-01-04 10:30 ` Kyrylo Tkachov
2021-01-05 11:41 ` Prathamesh Kulkarni
2021-01-05 13:07 ` Kyrylo Tkachov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAgBjMmmO7ya=uOg0n_vJM8HXEN3DEJh4OpUHO5bhnng0Cv1QA@mail.gmail.com' \
--to=prathamesh.kulkarni@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).