summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-13 09:36:29 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-13 09:36:29 +0000
commite8d7c24528a5bb7814014dbaa4bd0f9b52f3ecc6 (patch)
treee165106adb47a380d12f44a984550bc96976e5a3
parent0bb51635854f422fafd9414b1f7f985746661494 (diff)
downloadgcc-e8d7c24528a5bb7814014dbaa4bd0f9b52f3ecc6.tar.gz
* combine.c (if_then_else_cond): Be careful about what kinds
of RTL expressions are passed to operand_subword. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31383 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/combine.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8e33b563511..c5471bce8c3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
Wed Jan 12 22:34:00 2000 Jeffrey A Law (law@cygnus.com)
+ * combine.c (if_then_else_cond): Be careful about what kinds
+ of RTL expressions are passed to operand_subword.
+
* flow.c (split_edge): If we have to insert a new jump, make
sure to associate it with a basic block.
diff --git a/gcc/combine.c b/gcc/combine.c
index 484d6871a85..97ec1821989 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7216,7 +7216,10 @@ if_then_else_cond (x, ptrue, pfalse)
&& 0 != (cond0 = if_then_else_cond (SUBREG_REG (x),
&true0, &false0)))
{
- if (GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) > UNITS_PER_WORD
+ 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_WORD (x) != 0))
{
true0 = operand_subword (true0, SUBREG_WORD (x), 0, mode);