aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-04-25 10:43:58 -0700
committerRichard Henderson <rth@gcc.gnu.org>2003-04-25 10:43:58 -0700
commit8f4e6cafdebdae2730db4650e5c97e19f21481b6 (patch)
tree8945e69cf52d725d790b6183b34adb0155c86999
parentbb751e4780148937c6c35162519be89ec834d357 (diff)
downloadgcc-8f4e6cafdebdae2730db4650e5c97e19f21481b6.zip
gcc-8f4e6cafdebdae2730db4650e5c97e19f21481b6.tar.gz
gcc-8f4e6cafdebdae2730db4650e5c97e19f21481b6.tar.bz2
re PR rtl-optimization/10315 ([powerpc] ICE: in extract_insn, at recog.c:2175)
PR opt/10315 * config/rs6000/rs6000.c (rs6000_emit_move): Only elide proper checks during reload; use validize_mem instead of adjust_address. From-SVN: r66071
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.c25
2 files changed, 17 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7d291ea..2c378a8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-25 Richard Henderson <rth@redhat.com>
+
+ PR opt/10315
+ * config/rs6000/rs6000.c (rs6000_emit_move): Only elide proper
+ checks during reload; use validize_mem instead of adjust_address.
+
2003-04-26 Ben Elliston <bje@wasabisystems.com>
* config/arm/arm.c (arm_adjust_cost): Correct logic that tests the
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 9f9c42a..66e6e52 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2851,16 +2851,15 @@ rs6000_emit_move (dest, source, mode)
}
}
- /* Handle the case where reload calls us with an invalid address;
- and the case of CONSTANT_P_RTX. */
- if (!ALTIVEC_VECTOR_MODE (mode)
+ /* Handle the case where reload calls us with an invalid address. */
+ if (reload_in_progress && mode == Pmode
&& (! general_operand (operands[1], mode)
- || ! nonimmediate_operand (operands[0], mode)
- || GET_CODE (operands[1]) == CONSTANT_P_RTX))
- {
- emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
- return;
- }
+ || ! nonimmediate_operand (operands[0], mode)))
+ goto emit_set;
+
+ /* Handle the case of CONSTANT_P_RTX. */
+ if (GET_CODE (operands[1]) == CONSTANT_P_RTX)
+ goto emit_set;
/* FIXME: In the long term, this switch statement should go away
and be replaced by a sequence of tests based on things like
@@ -3088,13 +3087,11 @@ rs6000_emit_move (dest, source, mode)
/* Above, we may have called force_const_mem which may have returned
an invalid address. If we can, fix this up; otherwise, reload will
have to deal with it. */
- if (GET_CODE (operands[1]) == MEM
- && ! memory_address_p (mode, XEXP (operands[1], 0))
- && ! reload_in_progress)
- operands[1] = adjust_address (operands[1], mode, 0);
+ if (GET_CODE (operands[1]) == MEM && ! reload_in_progress)
+ operands[1] = validize_mem (operands[1]);
+ emit_set:
emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
- return;
}
/* Initialize a variable CUM of type CUMULATIVE_ARGS