Re: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

2011-04-07 Thread Bernd Schmidt
On 04/04/2011 06:04 PM, Henderson, Stuart wrote: > Yep, I'm seeing this behaviour (getting the error using your patch). > But I'm confused as to why the define_expand is being considered when > the predicate doesn't match. It's just a bug in expand. Your original patch (plus using const_int_operan

RE: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

2011-04-04 Thread Henderson, Stuart
Schmidt [mailto:ber...@codesourcery.com] Sent: 31 March 2011 17:02 To: Richard Henderson Cc: Henderson, Stuart; gcc-patches@gcc.gnu.org Subject: Re: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS On 03/31/2011 05:42 PM, Richard Henderson wrote: >> (rotate:SI (match

Re: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

2011-03-31 Thread Richard Henderson
On 03/31/2011 09:01 AM, Bernd Schmidt wrote: > I have a dim memory of the problem being that something didn't check the > predicate. Sure enough, with the patch below applied to a 4.3 tree, I get > > /local/src/egcs/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/20020226-1.c:43: > internal com

Re: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

2011-03-31 Thread Bernd Schmidt
On 03/31/2011 05:42 PM, Richard Henderson wrote: >> (rotate:SI (match_operand:SI 1 "register_operand" "") >> - (match_operand:SI 2 "immediate_operand" "")))] >> + (match_operand:SI 2 "const_int_operand" "")))] >>"" >> { >> - if (INTVAL (operands[2]) != 16) >>

Re: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

2011-03-31 Thread Richard Henderson
> (rotate:SI (match_operand:SI 1 "register_operand" "") > -(match_operand:SI 2 "immediate_operand" "")))] > +(match_operand:SI 2 "const_int_operand" "")))] >"" > { > - if (INTVAL (operands[2]) != 16) > + if (GET_CODE (operands[2]) != CONST_INT || INTVAL

RE: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

2011-03-31 Thread Henderson, Stuart
] Sent: 30 March 2011 18:26 To: Henderson, Stuart Cc: gcc-patches@gcc.gnu.org Subject: Re: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS On 03/29/2011 08:49 AM, Henderson, Stuart wrote: >(match_operand:SI 2 "immediate_operand" "&

Re: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

2011-03-30 Thread Richard Henderson
On 03/29/2011 08:49 AM, Henderson, Stuart wrote: >(match_operand:SI 2 "immediate_operand" "")))] >"" > { > - if (INTVAL (operands[2]) != 16) > + if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 16) > FAIL; Perhaps use const_int_operand instead of i