public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work058)] Fix assertion in try_const_anchors.
@ 2021-07-06 15:08 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2021-07-06 15:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:aab008fd8bd16161b707b558ae81a2376e5b4bc8

commit aab008fd8bd16161b707b558ae81a2376e5b4bc8
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Tue Jul 6 11:08:13 2021 -0400

    Fix assertion in try_const_anchors.
    
    If I set targetm.const_anchors, 8 of the Spec 2017 benchmarks fail to
    build due to an assertion in try_const_anchors.  This patch, just changes
    the assertion to return NULL_RTX.
    
    2021-07-06  Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
            * cse.c (try_const_anchors): Change an assertion to just
            returnning NULL_RTX.

Diff:
---
 gcc/cse.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/cse.c b/gcc/cse.c
index 4b7cbdce600..fb6b1791027 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -1314,7 +1314,10 @@ try_const_anchors (rtx src_const, machine_mode mode)
   if (GET_MODE_CLASS (mode) == MODE_CC)
     return NULL_RTX;
 
-  gcc_assert (SCALAR_INT_MODE_P (mode));
+  /* If it isn't an int, don't try to use it.  */
+  if (!SCALAR_INT_MODE_P (mode))
+    return NULL_RTX;
+
   if (!compute_const_anchors (src_const, &lower_base, &lower_offs,
 			      &upper_base, &upper_offs))
     return NULL_RTX;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-06 15:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 15:08 [gcc(refs/users/meissner/heads/work058)] Fix assertion in try_const_anchors Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).