This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/72863] New: Powerpc64le: redundant swaps when using vec_vsx_ld/st
- From: "anton at samba dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Aug 2016 13:08:54 +0000
- Subject: [Bug target/72863] New: Powerpc64le: redundant swaps when using vec_vsx_ld/st
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72863
Bug ID: 72863
Summary: Powerpc64le: redundant swaps when using vec_vsx_ld/st
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: anton at samba dot org
CC: amodra at gcc dot gnu.org, bergner at gcc dot gnu.org,
meissner at gcc dot gnu.org, segher at gcc dot gnu.org,
wschmidt at gcc dot gnu.org
Target Milestone: ---
Target: powerpc64le-linux
I notice swaps to and from memory with the following test case:
void b(void)
{
int i;
unsigned char *s8 = src;
unsigned char *d8 = dst;
for (i = 0; i < 100; i++) {
vector unsigned char vs = vec_vsx_ld(0, s8);
vector unsigned char vd = vec_vsx_ld(0, d8);
vector unsigned char vr = vec_xor(vs, vd);
vec_vsx_st(vr, 0, d8);
s8 += 16;
d8 += 16;
}
}
70: 98 56 00 7c lxvd2x vs0,0,r10
74: 98 4e 80 7d lxvd2x vs12,0,r9
78: 10 00 4a 39 addi r10,r10,16
7c: 50 02 60 f1 xxswapd vs11,vs0
80: 50 62 0c f0 xxswapd vs0,vs12
84: d0 04 0b f0 xxlxor vs0,vs11,vs0
88: 50 02 00 f0 xxswapd vs0,vs0
8c: 98 4f 00 7c stxvd2x vs0,0,r9
90: 10 00 29 39 addi r9,r9,16
94: dc ff 00 42 bdnz 70 <b+0x20>