On 06/06/11 15:26, Dmitry Plotnikov wrote:
On 06/06/2011 05:33 PM, Andrew Stubbs wrote:
On 06/06/11 14:26, Dmitry Plotnikov wrote:
if (const_ok_for_arm (INTVAL (x))
- || const_ok_for_arm (~INTVAL (x)))
+ || const_ok_for_arm (~INTVAL (x))
+ || (TARGET_THUMB2&& outer == PLUS
+ && (const_ok_for_op (INTVAL (x), outer))))

Sorry, I should have noticed before ...

This whole condition should be covered by a single call to
const_ok_for_op. It already calls const_ok_for_arm internally.

This condition is not covered by const_ok_for_op, because "outer" can be
equal to other rtx codes, which are not covered in const_ok_for_op like
IF_THEN_ELSE or MULT (I have several ICEs with these codes). I don't
know how to fix this correctly - should I add all codes to
const_ok_for_op or maybe just replace default alternative from
gcc_unreachable() to "return 0;" ?

That sounds reasonable to me - I mean, the constant is indeed not ok for those operations.

... but I'm not a maintainer ....

Andrew

Reply via email to