Hi,

    This patch fixes an ICE found by enabling const_anchor for rs6000. The BLKmode constant rtx is sent to try_const_anchors which causes assertion failure in try_const_anchors.

    The attachment are the patch diff and change log file.

    Bootstrapped and tested on powerpc64le with no regressions. Is this okay for trunk? Any  recommendations? Thanks a lot.

        * cse.c (cse_insn): Add a BLKmode check for const_anchor.
diff --git a/gcc/cse.c b/gcc/cse.c
index 37c6959abea..223fe8c714d 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5026,7 +5026,8 @@ cse_insn (rtx_insn *insn)
       if (targetm.const_anchor
          && !src_related
          && src_const
-         && GET_CODE (src_const) == CONST_INT)
+         && GET_CODE (src_const) == CONST_INT
+         && mode != BLKmode)
        {
          src_related = try_const_anchors (src_const, mode);
          src_related_is_const_anchor = src_related != NULL_RTX;

Reply via email to