public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/66675] New: Could improve vector bit_field_ref style optimizations.
@ 2015-06-25 21:03 ramana at gcc dot gnu.org
  2015-06-25 21:04 ` [Bug tree-optimization/66675] " ramana at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-06-25 21:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66675

            Bug ID: 66675
           Summary: Could improve vector bit_field_ref style
                    optimizations.
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ramana at gcc dot gnu.org
  Target Milestone: ---

This example 


#include <arm_neon.h>

int main(int argc, char *argv[])
{
    int8x8_t a = {argc, 1, 2, 3, 4, 5, 6, 7};
    int8x8_t b = {0, 1, 2, 3, 4, 5, 6, 7};
    int8x8_t c = vadd_s8(a, b);
    return c[0];
}


or it's variant written in gcc vector speak generate pretty terrible code for
AArch64 

main:
        adr     x1, .LC0
        ld1     {v0.8b}, [x1]
        ins     v0.b[0], w0
        adr     x0, .LC2
        ld1     {v1.8b}, [x0]
        add     v0.8b, v0.8b, v1.8b
        umov    w0, v0.b[0]
        sxtb    w0, w0
        ret
        .size   main, .-main


This could well be folded down to a simple function that returns just argc.
While this is a bit silly to expect in real life, it does show an interesting
example....


regards
Ramana


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-20  6:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 21:03 [Bug tree-optimization/66675] New: Could improve vector bit_field_ref style optimizations ramana at gcc dot gnu.org
2015-06-25 21:04 ` [Bug tree-optimization/66675] " ramana at gcc dot gnu.org
2015-06-25 21:06 ` [Bug tree-optimization/66675] Could improve vector lane folding style operations ramana at gcc dot gnu.org
2015-06-25 22:41 ` pinskia at gcc dot gnu.org
2015-06-25 22:42 ` pinskia at gcc dot gnu.org
2015-06-25 22:50 ` pinskia at gcc dot gnu.org
2021-08-20  6:01 ` pinskia at gcc dot gnu.org

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).