This is the mail archive of the gcc-patches@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]

[PATCH, i386]: Fix PR 59021, new vzeroupper instructions generated with -mavx


Hello!

Attached patch fixes PR 59021, where new vzeroupper instructions are
generated for -mavx after Vlad's useless insn removal patch.

The problem was, that we depent on (useless) moves to AVX256 function
argument registers in front of the function call to switch the mode to
DIRTY mode. This is not true anymore, so call_insn has to switch to
DIRTY mode by itself.

While looking at this area - always set the mode after the call_insn
in MODE_AFTER function.

2013-11-06  Uros Bizjak  <ubizjak@gmail.com>

    PR target/59021
    * config/i386/i386.c (ix86_avx_u128_mode_needed): Require
    AVX_U128_DIRTY mode for call_insn RTXes that use AVX256 registers.
    (ix86_avx_u128_mode_needed): Return AVX_U128_DIRTY mode for call_insn
    RTXes that return in AVX256 register.

testsuite/ChangeLog:

2013-11-06  Uros Bizjak  <ubizjak@gmail.com>

    PR target/59021
    * gcc.target/i386/pr59021.c: New test.

Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32}, configured with "--with-arch=core-avx-i --with-cpu=core-avx-i
--with-fpmath=avx".

The patch will be backported to 4.7 and 4.8 branch in a couple of days.

Uros.

Attachment: p.diff.txt
Description: Text document


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