https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79158
Pat Haugen <pthaugen at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pthaugen at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |pthaugen at gcc dot
gnu.org
--- Comment #1 from Pat Haugen <pthaugen at gcc dot gnu.org> ---
The problem on BE is that the compiler recognizes it doesn't have to move the
value back to a VSR before dong the store, and just generates stores of the GPR
(hence the FAILs on mtvsrd/stxvd2x). Here's the source of testcase and output
on BE with current trunk.
#ifndef TYPE
#define TYPE __float128
#endif
void foo (TYPE *p, TYPE *q)
{
TYPE r = *q;
#ifndef NO_ASM
__asm__ (" # %0" : "+r" (r));
#endif
*p = r;
}
.L.foo:
lxvd2x 0,0,4
mfvsrd 10,0
xxpermdi 0,0,0,3
mfvsrd 11,0
#APP
# 14 "pr70669.c" 1
# 10
# 0 "" 2
#NO_APP
std 10,0(3)
std 11,8(3)
blr
Since this testcase is just trying to test that the moves don't go through
memory, modifying the last stmt to "*p = r + r" so that the value in 'r' (i.e.
GPR 10/11) is forced back to a VSR appears to fix the problem on BE and still
passes on LE.
Mike, Does this reasoning sound correct to you? If so I'll submit a patch.