This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Allow fwprop to undo vectorization harm (PR68961)
On Wed, 13 Jul 2016, Uros Bizjak wrote:
> On Sun, Jul 10, 2016 at 10:12 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> > On Wed, Jul 6, 2016 at 3:18 PM, Richard Biener <rguenther@suse.de> wrote:
> >
> >>> > 2016-07-04 Richard Biener <rguenther@suse.de>
> >>> >
> >>> > PR rtl-optimization/68961
> >>> > * fwprop.c (propagate_rtx): Allow SUBREGs of VEC_CONCAT and CONCAT
> >>> > to simplify to a non-constant.
> >>> >
> >>> > * gcc.target/i386/pr68961.c: New testcase.
> >>>
> >>> Thanks, LGTM.
> >>
> >> Bootstrapped and tested on x86_64-unknown-linux-gnu, it causes
> >>
> >> FAIL: gcc.target/i386/sse2-load-multi.c scan-assembler-times movup 2
> >>
> >> as the peephole created for that testcase no longer applies as fwprop
> >> does
> >>
> >> In insn 10, replacing
> >> (vec_concat:V2DF (vec_select:DF (reg:V2DF 91)
> >> (parallel [
> >> (const_int 0 [0])
> >> ]))
> >> (mem:DF (reg/f:DI 95) [0 S8 A128]))
> >> with (vec_concat:V2DF (reg:DF 93 [ MEM[(const double *)&a + 8B] ])
> >> (mem:DF (reg/f:DI 95) [0 S8 A128]))
> >> Changed insn 10
> >>
> >> resulting in
> >>
> >> movsd a+8(%rip), %xmm0
> >> movhpd a+16(%rip), %xmm0
> >>
> >> again rather than movupd.
> >>
> >> Uros, there is probably a missing peephole for the new form - can you
> >> fix this as a followup or should I hold on this patch for a bit longer?
> >
> > No, please proceed with the patch, I'll fix this fallout with a
> > followup patch in a couple of days.
>
> Fixed with attached patch.
>
> 2016-07-13 Uros Bizjak <ubizjak@gmail.com>
>
> PR rtl-optimization/68961
> * config/i386/sse.md (movsd/movhpd to movupd peephole2s): Add new
> peephole variant. Use sse_reg_operand predicates.
>
> Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
>
> Committed to mainline SVN.
Thanks Uros.
Richard.