This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for DE40487
On Wed, 2009-07-15 at 11:28 +0100, Richard Earnshaw wrote:
> This patch allows combine to correctly simplify the instruction sequence
> demonstrated by de 40487 (where we are getting redundant zero-extend
> operations in logical operations). tested on an arm-elf cross and
> installed on mainline.
>
> R.
>
> 2009-07-15 Richard Earnshaw <rearnsha@arm.com>
>
> * arm.md (ior_xor): New code iterator.
> (split for ior/xor with shift and zero-extend): New split pattern.
> * arm/predicates.md (subreg_lowpart_operator): New special predicate.
>
>
This patch introduced a warning for signed/unsigned comparison, which of
course broke native bootstraps.
Fixed thusly:
2009-07-23 Richard Earnshaw <rearnsha@arm.com>
(split for ior/xor with shift and zero-extend): Cast op3 to
unsigned HWI.
*** arm.md (revision 150026)
--- arm.md (local)
*************** (define_split
*** 4219,4225 ****
(match_operator 5 "subreg_lowpart_operator"
[(match_operand:SI 4 "s_register_operand" "")]))))]
"TARGET_32BIT
! && (INTVAL (operands[3])
== (GET_MODE_MASK (GET_MODE (operands[5]))
& (GET_MODE_MASK (GET_MODE (operands[5]))
<< (INTVAL (operands[2])))))"
--- 4219,4225 ----
(match_operator 5 "subreg_lowpart_operator"
[(match_operand:SI 4 "s_register_operand" "")]))))]
"TARGET_32BIT
! && ((unsigned HOST_WIDE_INT) INTVAL (operands[3])
== (GET_MODE_MASK (GET_MODE (operands[5]))
& (GET_MODE_MASK (GET_MODE (operands[5]))
<< (INTVAL (operands[2])))))"