Re: [PATCH][ARM] Fix broken shift patterns

2011-10-07 Thread Andrew Stubbs
On 06/10/11 18:17, Paul Brook wrote: I believe this patch to be nothing but an improvement over the current state, and that a fix to the constraint problem should be a separate patch. In that basis, am I OK to commit? One minor nit: (define_special_predicate shift_operator ... + (ior

Re: [PATCH][ARM] Fix broken shift patterns

2011-10-07 Thread Andrew Stubbs
On 06/10/11 16:01, Andrew Stubbs wrote: (define_special_predicate shift_operator (and (ior (ior (and (match_code mult) (match_test power_of_two_operand (XEXP (op, 1), mode))) (and (match_code rotate) (match_test GET_CODE (XEXP

Re: [PATCH][ARM] Fix broken shift patterns

2011-10-07 Thread Paul Brook
Oh, I forgot to say, I don't understand why the rotate operator is special cased? If I understand it correctly, the effect of the (existing) rotate is both to check the constant range, AND to disallow registers as the shift amount. This difference has no effect on Thumb, but might cause ARM

Re: [PATCH][ARM] Fix broken shift patterns

2011-10-07 Thread Paul Brook
Done, and attached. Ok. Two changes to the testcase that I'll pre-approve: - Add a comment along the lines of /* ARM has shift-and-alu insns. Depending on the ALU op GCC represents some of these as a left shift, others as a multiply. Check that we match the right one. */ - Also test

Re: [PATCH][ARM] Fix broken shift patterns

2011-10-07 Thread Andrew Stubbs
On 07/10/11 13:37, Paul Brook wrote: Done, and attached. Ok. Two changes to the testcase that I'll pre-approve: - Add a comment along the lines of /* ARM has shift-and-alu insns. Depending on the ALU op GCC represents some of these as a left shift, others as a multiply. Check that we

[PATCH][ARM] Fix broken shift patterns

2011-10-06 Thread Andrew Stubbs
This patch is a follow-up both to my patches here: http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00049.html and Paul Brook's patch here: http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01076.html The patch fixes both the original problem, in which negative shift constants caused an ICE

Re: [PATCH][ARM] Fix broken shift patterns

2011-10-06 Thread Paul Brook
I believe this patch to be nothing but an improvement over the current state, and that a fix to the constraint problem should be a separate patch. In that basis, am I OK to commit? One minor nit: (define_special_predicate shift_operator ... + (ior (match_test GET_CODE (XEXP (op, 1))