This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/60826] inefficient code for vector xor on SSE2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60826

--- Comment #2 from Dan Gohman <sunfish at mozilla dot com> ---
A little more detail: I think I have seen GCC use a spill + movsd reload as a
method of zeroing the non-zero-index vector elements of an xmm register,
however that's either not what's happening here, or it may be happening when it
isn't needed.

I think the x86-64 ABI doesn't require the unused parts of an xmm return
register to be zeroed, but even if it does, I can also reproduce the
unnecessary spill and reload when I modify the test function above to this:

void test(v2f64 w, v2f64 x, v2f64 z, double *p)
{
    v2f64 y = f_and(w, x);

    *p = vector_to_scalar(f_xor(z, y));
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]