public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106707] [13 Regression] ICE: in cselib_record_set, at cselib.cc:2687 with -Oz -g -fno-cprop-registers -fno-dce since r13-1945-gfc6ef90173478521
       [not found] <bug-106707-4@http.gcc.gnu.org/bugzilla/>
@ 2022-08-30 10:08 ` ubizjak at gmail dot com
  2022-09-01 22:22 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: ubizjak at gmail dot com @ 2022-08-30 10:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106707

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
The following pattern is matched by a peephole2 pattern:

(insn 164 161 165 5 (set (reg:DI 0 ax [orig:91 _10 ] [91])
        (reg:DI 0 ax)) "pr106707.c":13:12 82 {*movdi_internal}
     (expr_list:REG_UNUSED (reg:DI 0 ax [orig:91 _10 ] [91])
        (nil)))

and produces invalid RTL:

(insn 196 161 197 5 (parallel [
            (set (reg:DI 0 ax [orig:91 _10 ] [91])
                (reg:DI 0 ax))
            (set (reg:DI 0 ax)
                (reg:DI 0 ax [orig:91 _10 ] [91]))
        ]) "pr106707.c":13:12 -1
     (nil))

The fix is similar to the one proposed in Comment #4, but we can use:

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index a4a18cf89f5..1aef1af594d 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -3043,8 +3043,8 @@
   [(set (match_operand:SWI48 0 "general_reg_operand")
        (match_operand:SWI48 1 "general_reg_operand"))]
  "optimize_size > 1
-  && (REGNO (operands[0]) == AX_REG
-      || REGNO (operands[1]) == AX_REG)
+  && ((REGNO (operands[0]) == AX_REG)
+      != (REGNO (operands[1]) == AX_REG))
   && optimize_insn_for_size_p ()
   && peep2_reg_dead_p (1, operands[1])"
   [(parallel [(set (match_dup 0) (match_dup 1))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/106707] [13 Regression] ICE: in cselib_record_set, at cselib.cc:2687 with -Oz -g -fno-cprop-registers -fno-dce since r13-1945-gfc6ef90173478521
       [not found] <bug-106707-4@http.gcc.gnu.org/bugzilla/>
  2022-08-30 10:08 ` [Bug target/106707] [13 Regression] ICE: in cselib_record_set, at cselib.cc:2687 with -Oz -g -fno-cprop-registers -fno-dce since r13-1945-gfc6ef90173478521 ubizjak at gmail dot com
@ 2022-09-01 22:22 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-01 22:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106707

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:6761d362c3efe5f4ca3b0c66e6854015acf162a1

commit r13-2358-g6761d362c3efe5f4ca3b0c66e6854015acf162a1
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Sep 1 15:18:18 2022 -0700

    i386: Replace long with long long for 64-bit integer

    Replace long with long long for 64-bit integer since long may be 32
    bits.

            PR target/106707
            * gcc.target/i386/pr106707.c (foo): Replace long with long long.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-01 22:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-106707-4@http.gcc.gnu.org/bugzilla/>
2022-08-30 10:08 ` [Bug target/106707] [13 Regression] ICE: in cselib_record_set, at cselib.cc:2687 with -Oz -g -fno-cprop-registers -fno-dce since r13-1945-gfc6ef90173478521 ubizjak at gmail dot com
2022-09-01 22:22 ` cvs-commit at gcc dot gnu.org

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).