diff mbox

[01/13] recog: Increased max number of alternatives.

Message ID 1431350621-21405-2-git-send-email-krebbel@linux.vnet.ibm.com
State New
Headers show

Commit Message

Andreas Krebbel May 11, 2015, 1:23 p.m. UTC
With the vector facility support z13 mov patterns have more than 30
alternatives.

gcc/
	* recog.h: Increase MAX_RECOG_ALTERNATIVES.
---
 gcc/recog.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Segher Boessenkool May 11, 2015, 2:01 p.m. UTC | #1
On Mon, May 11, 2015 at 03:23:29PM +0200, Andreas Krebbel wrote:
> With the vector facility support z13 mov patterns have more than 30
> alternatives.

Wow, that is a lot!

> --- a/gcc/recog.h
> +++ b/gcc/recog.h
> @@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
>  /* Random number that should be large enough for all purposes.  Also define
>     a type that has at least MAX_RECOG_ALTERNATIVES + 1 bits, with the extra
>     bit giving an invalid value that can be used to mean "uninitialized".  */
> -#define MAX_RECOG_ALTERNATIVES 30
> +#define MAX_RECOG_ALTERNATIVES 35
>  typedef unsigned int alternative_mask;

"int" isn't at least 36 bits.


Segher
Andreas Krebbel May 11, 2015, 2:46 p.m. UTC | #2
On 05/11/2015 04:01 PM, Segher Boessenkool wrote:
> On Mon, May 11, 2015 at 03:23:29PM +0200, Andreas Krebbel wrote:
>> With the vector facility support z13 mov patterns have more than 30
>> alternatives.
> 
> Wow, that is a lot!
> 
>> --- a/gcc/recog.h
>> +++ b/gcc/recog.h
>> @@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
>>  /* Random number that should be large enough for all purposes.  Also define
>>     a type that has at least MAX_RECOG_ALTERNATIVES + 1 bits, with the extra
>>     bit giving an invalid value that can be used to mean "uninitialized".  */
>> -#define MAX_RECOG_ALTERNATIVES 30
>> +#define MAX_RECOG_ALTERNATIVES 35
>>  typedef unsigned int alternative_mask;
> 
> "int" isn't at least 36 bits.

Right. That should be unsigned HOST_WIDE_INT instead.

Thanks!

-Andreas-
Jeff Law May 11, 2015, 5:03 p.m. UTC | #3
On 05/11/2015 07:23 AM, Andreas Krebbel wrote:
> With the vector facility support z13 mov patterns have more than 30
> alternatives.
>
> gcc/
> 	* recog.h: Increase MAX_RECOG_ALTERNATIVES.
> ---
>   gcc/recog.h |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/recog.h b/gcc/recog.h
> index 8a38b26..4d8ca0c 100644
> --- a/gcc/recog.h
> +++ b/gcc/recog.h
> @@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
>   /* Random number that should be large enough for all purposes.  Also define
>      a type that has at least MAX_RECOG_ALTERNATIVES + 1 bits, with the extra
>      bit giving an invalid value that can be used to mean "uninitialized".  */
> -#define MAX_RECOG_ALTERNATIVES 30
> +#define MAX_RECOG_ALTERNATIVES 35
>   typedef unsigned int alternative_mask;
Yow! Won't think break on 32bit integer targets?

Which leads me to ponder how difficult it would be to catch this in the 
generators so that a port which had too many alternatives would at least 
issue a sensible error during the build process.

Jeff
diff mbox

Patch

diff --git a/gcc/recog.h b/gcc/recog.h
index 8a38b26..4d8ca0c 100644
--- a/gcc/recog.h
+++ b/gcc/recog.h
@@ -23,7 +23,7 @@  along with GCC; see the file COPYING3.  If not see
 /* Random number that should be large enough for all purposes.  Also define
    a type that has at least MAX_RECOG_ALTERNATIVES + 1 bits, with the extra
    bit giving an invalid value that can be used to mean "uninitialized".  */
-#define MAX_RECOG_ALTERNATIVES 30
+#define MAX_RECOG_ALTERNATIVES 35
 typedef unsigned int alternative_mask;
 
 /* A mask of all alternatives.  */