aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@gcc.gnu.org>2001-06-04 18:04:36 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2001-06-04 18:04:36 +0000
commit0631e0bfb7d40fd3cb58d2d5400075f49000ab51 (patch)
tree829c85ccd2ce524faa3bdeb601db3f7f80cc282f /gcc/combine.c
parent5c626f5260d6e2f48bdbd5461b74d11fdd02afe0 (diff)
downloadgcc-0631e0bfb7d40fd3cb58d2d5400075f49000ab51.zip
gcc-0631e0bfb7d40fd3cb58d2d5400075f49000ab51.tar.gz
gcc-0631e0bfb7d40fd3cb58d2d5400075f49000ab51.tar.bz2
rtlanal.c (operand_preference): Fix preference for objects.
* rtlanal.c (operand_preference): Fix preference for objects. * gcse.c (handle_avail_expr): Be prepared to handle single_set parallels. * combine.c (if_then_else_cond): Use simplify_subreg instead of operand_subword. * integreate.c (sub_constants): Likewise. * emit-rtl.c (constant_subword): Deprecate; remove most of code and use simplify_gen_subreg. Mon Jun 4 19:55:23 CEST 2001 Lars Brinkhoff <lars@nocrew.org> * sibcall.c (skip_copy_to_return_value): recognize the situation when the called function's return value is copied into an intermediate pseudo, and then into the calling functions return value register. From-SVN: r42864
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index e34ab2f..d3c70c3 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7293,29 +7293,16 @@ if_then_else_cond (x, ptrue, pfalse)
return cond0;
}
- /* If X is a normal SUBREG with both inner and outer modes integral,
- we can narrow both the true and false values of the inner expression,
- if there is a condition. */
- else if (code == SUBREG && GET_MODE_CLASS (mode) == MODE_INT
- && GET_MODE_CLASS (GET_MODE (SUBREG_REG (x))) == MODE_INT
- && GET_MODE_SIZE (mode) <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))
+ /* If X is a SUBREG, we can narrow both the true and false values
+ if the inner expression, if there is a condition. */
+ else if (code == SUBREG
&& 0 != (cond0 = if_then_else_cond (SUBREG_REG (x),
&true0, &false0)))
{
- if ((GET_CODE (SUBREG_REG (x)) == REG
- || GET_CODE (SUBREG_REG (x)) == MEM
- || CONSTANT_P (SUBREG_REG (x)))
- && GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) > UNITS_PER_WORD
- && (WORDS_BIG_ENDIAN || SUBREG_BYTE (x) >= UNITS_PER_WORD))
- {
- true0 = operand_subword (true0, SUBREG_BYTE (x) / UNITS_PER_WORD, 0,
- GET_MODE (SUBREG_REG (x)));
- false0 = operand_subword (false0, SUBREG_BYTE (x) / UNITS_PER_WORD, 0,
- GET_MODE (SUBREG_REG (x)));
- }
- *ptrue = force_to_mode (true0, mode, ~(HOST_WIDE_INT) 0, NULL_RTX, 0);
- *pfalse
- = force_to_mode (false0, mode, ~(HOST_WIDE_INT) 0, NULL_RTX, 0);
+ *ptrue = simplify_gen_subreg (mode, true0,
+ GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x));
+ *pfalse = simplify_gen_subreg (mode, false0,
+ GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x));
return cond0;
}