Commit adc05e6c by Jeffrey A Law Committed by Jeff Law

combine.c (simplify_comparison): Do not commute a AND into a paradoxical SUBREG…

combine.c (simplify_comparison): Do not commute a AND into a paradoxical SUBREG if not WORD_REGISTER_OPERATIONS.

	* combine.c (simplify_comparison): Do not commute a AND into
	a paradoxical SUBREG if not WORD_REGISTER_OPERATIONS.

From-SVN: r20934
parent 80de1662
Sun Jul 5 23:58:19 1998 Jeffrey A Law (law@cygnus.com)
* combine.c (simplify_comparison): Do not commute a AND into
a paradoxical SUBREG if not WORD_REGISTER_OPERATIONS.
* i386/freebsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Protect with
HAVE_GAS_MAX_SKIP_P2ALIGN.
* i386/linux.h: Likewise.
......
......@@ -10154,6 +10154,16 @@ simplify_comparison (code, pop0, pop1)
|| subreg_lowpart_p (XEXP (op0, 0))
#endif
)
#ifndef WORD_REGISTER_OPERATIONS
/* It is unsafe to commute the AND into the SUBREG if the SUBREG
is paradoxical and WORD_REGISTER_OPERATIONS is not defined.
As originally written the upper bits have a defined value
due to the AND operation. However, if we commute the AND
inside the SUBREG then they no longer have defined values
and the meaning of the code has been changed. */
&& (GET_MODE_SIZE (GET_MODE (XEXP (op0, 0)))
<= GET_MODE_SIZE (GET_MODE (SUBREG_REG (XEXP (op0, 0)))))
#endif
&& GET_CODE (XEXP (op0, 1)) == CONST_INT
&& mode_width <= HOST_BITS_PER_WIDE_INT
&& (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (XEXP (op0, 0))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment