Hello,
as discussed in the PR, this patch removes an invalid ENABLE_CHECKING
sanity check in rs6000_delegitimize_address, fixing the ICE.
Tested on powerpc64-linux.
OK for mainline / 4.9 / 4.8?
Bye,
Ulrich
ChangeLog:
PR target/64115
* config/rs6000/rs6000.c (rs6000_delegitimize_address): Remove
invalid UNSPEC_TOCREL sanity check under ENABLE_CHECKING.
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 218210)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -7033,24 +7033,6 @@
if (GET_CODE (y) == UNSPEC
&& XINT (y, 1) == UNSPEC_TOCREL)
{
-#ifdef ENABLE_CHECKING
- if (REG_P (XVECEXP (y, 0, 1))
- && REGNO (XVECEXP (y, 0, 1)) == TOC_REGISTER)
- {
- /* All good. */
- }
- else if (GET_CODE (XVECEXP (y, 0, 1)) == DEBUG_EXPR)
- {
- /* Weirdness alert. df_note_compute can replace r2 with a
- debug_expr when this unspec is in a debug_insn.
- Seen in gcc.dg/pr51957-1.c */
- }
- else
- {
- debug_rtx (orig_x);
- abort ();
- }
-#endif
y = XVECEXP (y, 0, 0);
#ifdef HAVE_AS_TLS
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
[email protected]