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]

Re: [PATCH] Fix ICE with vector types in X % -Y pattern (PR middle-end/70050)


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


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