[PATCH] [AArch64] PR target/71663 Improve Vector Initializtion

Hurugalawadi, Naveen Naveen.Hurugalawadi@cavium.com
Wed Apr 26 09:04:00 GMT 2017


Hi Kyrill,

Thanks for the review and your comments.

>> It would be useful if you expanded a bit on the approach used to
>> generate the improved codegen

The patch creates a duplicate of most common element and tries to optimize
the insertion using dup for the element followed by insertions.

Current code:
============================================
        movi    v2.4s, 0
        ins     v2.s[0], v0.s[0]
        ins     v2.s[1], v1.s[0]
        ins     v2.s[2], v0.s[0]
        orr     v0.16b, v2.16b, v2.16b
        ins     v0.s[3], v3.s[0]
        ret
============================================

Code after the patch:
============================================
        dup     v0.4s, v0.s[0]
        ins     v0.s[1], v1.s[0]
        ins     v0.s[3], v3.s[0]
        ret
============================================

>> Some typos

Modified as required

>> worth adding a testcase where one of the vector elements appears more than
>> the others?

Modified the testcase as required using common element.

Please review the patch and let us know if its okay?
Bootstrapped and Regression tested on aarch64-thunder-linux.

Thanks,
Naveen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr71663-2.patch
Type: text/x-diff
Size: 2469 bytes
Desc: pr71663-2.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170426/7dc2452a/attachment.bin>


More information about the Gcc-patches mailing list