This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/66675] New: Could improve vector bit_field_ref style optimizations.
- From: "ramana at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Jun 2015 21:03:04 +0000
- Subject: [Bug tree-optimization/66675] New: Could improve vector bit_field_ref style optimizations.
- Auto-submitted: auto-generated
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