On Thu, Jan 30, 2014 at 11:34 AM, Bill Schmidt
<wschm...@linux.vnet.ibm.com> wrote:
> Hi,
>
> When I implemented the mergeh/mergel code for -maltivec=be, I forgot to
> add DONE; at the end of the define_expands, leading to spurious "use"
> rtx's in the RTL stream.  I discovered this while testing some other
> code, where a similar problem resulted in some missed optimizations.
> This patch fixes the issue.
>
> As a side note, I had copied existing patterns that wrapped the
> "match_operand"s in "use"s, but I don't see any reason for that in
> retrospect, so I removed the "use"s altogether.
>
> Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with no
> regressions.  Ok for trunk?
>
> Thanks,
> Bill
>
>
> 2014-01-30  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
>
>         * config/rs6000/vsx.md (vsx_mergel_<mode>): Remove "use"
>         specifications; add DONE.
>         (vsx_mergeh_<mode>): Likewise.
>         * config/rs6000/altivec.md (altivec_vmrghb): Likewise.
>         (altivec_vmrghh): Likewise.
>         (altivec_vmrghw): Likewise.
>         (altivec_vmrglb): Likewise.
>         (altivec_vmrglh): Likewise.
>         (altivec_vmrglw): Likewise.

Please add the "DONE" but do not remove the "USE" from the RTL
patterns. Although the "DONE" in the preparation statement means that
the RTL template is ignored, the template RTL should be
"grammatically" correct and include "USE". A pattern should not
contain bare operands without some operation (at least USE or UNSPEC)
surrounding them.

Okay with that change and any other patterns that incorrectly omitted "USE".

Thanks, David

Reply via email to