diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-25 17:45:16 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-25 17:45:16 +0000 |
commit | ba0688f3de61d72771494c34f7aa8bc5681cb120 (patch) | |
tree | 593199813ce2d072fac01d971d875d5eb65de1b6 /gcc | |
parent | e6f295fbb08ee5dc2d0b2d08d71ff824f952ef91 (diff) | |
download | gcc-ba0688f3de61d72771494c34f7aa8bc5681cb120.tar.gz |
* combine.c (simplify_comparison, case AND): Remove a redundant
test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61787 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/combine.c | 16 |
2 files changed, 11 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 942b37feabc..f8b02bd5438 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-01-25 Kazu Hirata <kazu@cs.umass.edu> + + * combine.c (simplify_comparison, case AND): Remove a redundant + test. + 2002-01-25 Roger Sayle <roger@eyesopen.com> * function.h (struct function): New field calls_constant_p. diff --git a/gcc/combine.c b/gcc/combine.c index 75a4e5fccb8..d21daa0bf7e 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -10908,6 +10908,12 @@ simplify_comparison (code, pop0, pop1) represents the low part, permute the SUBREG and the AND and try again. */ if (GET_CODE (XEXP (op0, 0)) == SUBREG + /* 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. */ && (0 #ifdef WORD_REGISTER_OPERATIONS || ((mode_width @@ -10919,16 +10925,6 @@ simplify_comparison (code, pop0, pop1) <= (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (XEXP (op0, 0)))))) && subreg_lowpart_p (XEXP (op0, 0)))) -#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)))) |