This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Small force_to_mode fix
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Small force_to_mode fix
- From: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Date: Thu, 27 May 1999 14:02:34 +0200
Hi,
This test in force_to_mode seems to bypass some optimizations (such as
removing redundand ANDs) when mask is not 0xffffffff.
Thu May 27 12:26:43 MET DST 1999 Jan Hubicka <hubicka@freesoft.cz>
* combine.c (force_to_mode): Try to simplify when mask is not full.
*** combine.old Thu May 27 12:25:27 1999
--- combine.c Thu May 27 12:25:35 1999
*************** force_to_mode (x, mode, mask, reg, just_
*** 6289,6297 ****
&& (GET_MODE_MASK (GET_MODE (x)) & ~ mask) == 0)
return gen_lowpart_for_combine (mode, x);
! /* If we aren't changing the mode, X is not a SUBREG, and all zero bits in
! MASK are already known to be zero in X, we need not do anything. */
! if (GET_MODE (x) == mode && code != SUBREG && (~ mask & nonzero) == 0)
return x;
switch (code)
--- 6289,6297 ----
&& (GET_MODE_MASK (GET_MODE (x)) & ~ mask) == 0)
return gen_lowpart_for_combine (mode, x);
! /* If we aren't changing the mode, X is not a SUBREG, and mask is full,
! we need not do anything. */
! if (GET_MODE (x) == mode && code != SUBREG && ~ mask == 0)
return x;
switch (code)