This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICE with vector types in X % -Y pattern (PR middle-end/70050)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Mar 2016 12:34:48 +0100
- Subject: Re: [PATCH] Fix ICE with vector types in X % -Y pattern (PR middle-end/70050)
- Authentication-results: sourceware.org; auth=none
- References: <20160303110431 dot GB10006 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Mar 03, 2016 at 12:04:31PM +0100, Marek Polacek wrote:
> We crashed on the attached testcase because we were trying to apply the
> X % -Y -> X % Y transformation even on vectors. That doesn't go well with the
> check for !TYPE_UNSIGNED. So I think let's limit the pattern to only work on
> integral types.
I think TYPE_UNSIGNED is fine, but TYPE_MIN_VALUE is not.
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2016-03-03 Marek Polacek <polacek@redhat.com>
>
> PR middle-end/70050
> * match.pd (X % -Y): Add INTEGRAL_TYPE_P check.
>
> * gcc.dg/pr70050.c: New test.
Ok, thanks.
Jakub