This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Vectorizing abs(char/short/int) on x86.
- From: Cong Hou <congh at google dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 31 Oct 2013 13:20:05 -0700
- Subject: Re: [PATCH] Vectorizing abs(char/short/int) on x86.
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4Z0XuPm9Js00xp-9p2+0RFZDrs0hEmJNckDvOgOQrrtGA at mail dot gmail dot com> <CAK=A3=3x_BOkyUvRuimD-3r1cpbG82x+NP15OptR-BetBB_mjg at mail dot gmail dot com> <CAFULd4YKqqrZ8nvid2Vy+6nBjDZixF59DdMmcyw0Rx9bORNh-Q at mail dot gmail dot com> <CAK=A3=3YJnZTVnxQPiMv10n=8-CWQe9H+Bh+H_ChKOedZhoFpA at mail dot gmail dot com> <CAFULd4ZRJGsCXabgpjwemNnJ23f7idUMTerS7wspuiBVpKz4Fg at mail dot gmail dot com> <CAK=A3=3-qKTNUaYuvh4iUyufHvQ=kC24CaGEyQBkzJkvgbO_-w at mail dot gmail dot com> <CAFULd4Z0Mx_dpT73AGmZ58gS_HVYPMiUS=Z=gHAMZMhEfYFOdg at mail dot gmail dot com> <CAK=A3=2A2V36aaqoz5SF9UEgr-wfi4wpneciB+zTkz=91wgE2w at mail dot gmail dot com> <CAFULd4aq5FKYTCa+7vCepEkxv+g9t3b-XpfL3Q+Zw5F_bN1q9w at mail dot gmail dot com>
This update makes it more safe. You showed me how to write better
expand code. Thank you for the improvement!
thanks,
Cong
On Thu, Oct 31, 2013 at 11:43 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Wed, Oct 30, 2013 at 9:02 PM, Cong Hou <congh@google.com> wrote:
>> I have run check_GNU_style.sh on my patch.
>>
>> The patch is submitted. Thank you for your comments and help on this patch!
>
> I have committed a couple of fixes/improvements to your expander in
> i386.c. There is no need to check for the result of
> expand_simple_binop. Also, there is no guarantee that
> expand_simple_binop will expand to the target. It can return different
> RTX. Also, unhandled modes are now marked with gcc_unreachable.
>
> 2013-10-31 Uros Bizjak <ubizjak@gmail.com>
>
> * config/i386/i386.c (ix86_expand_sse2_abs): Rename function arguments.
> Use gcc_unreachable for unhandled modes. Do not check results of
> expand_simple_binop. If not expanded to target, move the result.
>
> Tested on x86_64-pc-linux-gnu and committed.
>
> Uros.