public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/57604] LRA related bootstrap comparison failure on s390x --with-arch=zEC12
       [not found] <bug-57604-4@http.gcc.gnu.org/bugzilla/>
@ 2013-06-14  9:45 ` krebbel at gcc dot gnu.org
  2013-06-18  2:31 ` vmakarov at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: krebbel at gcc dot gnu.org @ 2013-06-14  9:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57604

--- Comment #1 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
This is caused by a miscompilation of cp/lex.c:

#define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, ASSN_P)            \
  sprintf (buffer, ISALPHA (NAME[0]) ? "operator %s" : "operator%s", NAME); \
  identifier = get_identifier (buffer);                        \
...

The problem is that during LRA an add insn is being generated which is placed
between the "ISALPHA" check and the conditional load for the format string. 
The ADD which is generated clobbers the condition code why DSE later removes
the "ISALPHA" check completely.

When generating the ADD LRA probably needs to check whether it will break
dataflow. On S/390 we can do such address calculations without clobbering CC by
using the load address instruction. Unfortunately la cannot be used for generic
add patterns when generating 32 bit code since it only deals with the lower 31
bits.

Breakpoint 1, make_insn_raw (pattern=0x3fff6195580) at
/home/andreas/clean/gcc-head/gcc/emit-rtl.c:3651
3651      insn = rtx_alloc (INSN);
(gdb) p debug_rtx(pattern)
(parallel [
        (set (reg:DI 3022)
            (plus:DI (reg/f:DI 34 %fp)
                (const_int 176 [0xb0])))
        (clobber (reg:CC 33 %cc))
    ])
$1 = void
(gdb) bt
#0  make_insn_raw (pattern=0x3fff6195580) at
/home/andreas/clean/gcc-head/gcc/emit-rtl.c:3651
#1  0x00000000805b4578 in emit_insn (x=0x3fff6195580) at
/home/andreas/clean/gcc-head/gcc/emit-rtl.c:4736
#2  0x00000000807d5e74 in lra_emit_add (x=0x3fff7a079c0, y=0x3fff78754c0,
z=0x3fff632a630) at /home/andreas/clean/gcc-head/gcc/lra.c:266
#3  0x00000000807d656e in lra_emit_move (x=0x3fff7a079c0, y=0x3fff6199600) at
/home/andreas/clean/gcc-head/gcc/lra.c:415
#4  0x00000000807eb7fa in curr_insn_transform() ()
#5  0x00000000807ed45c in lra_constraints(bool) ()
#6  0x00000000807dc616 in lra (f=0x816a46f0) at
/home/andreas/clean/gcc-head/gcc/lra.c:2278
#7  0x00000000807845a6 in do_reload () at
/home/andreas/clean/gcc-head/gcc/ira.c:4641
#8  0x000000008078485e in rest_of_handle_reload () at
/home/andreas/clean/gcc-head/gcc/ira.c:4753
#9  0x000000008085a4b2 in execute_one_pass (pass=0x81359060 <pass_reload>) at
/home/andreas/clean/gcc-head/gcc/passes.c:2337
#10 0x000000008085a76a in execute_pass_list (pass=0x81359060 <pass_reload>) at
/home/andreas/clean/gcc-head/gcc/passes.c:2389
#11 0x000000008085a7b8 in execute_pass_list (pass=0x813597d0
<pass_rest_of_compilation>) at /home/andreas/clean/gcc-head/gcc/passes.c:2390
#12 0x00000000804ece5e in expand_function (node=0x3fff62f1130) at
/home/andreas/clean/gcc-head/gcc/cgraphunit.c:1582
#13 0x00000000804ed418 in expand_all_functions () at
/home/andreas/clean/gcc-head/gcc/cgraphunit.c:1686
#14 0x00000000804ee00c in compile () at
/home/andreas/clean/gcc-head/gcc/cgraphunit.c:2020
#15 0x00000000804ee1f0 in finalize_compilation_unit () at
/home/andreas/clean/gcc-head/gcc/cgraphunit.c:2097
#16 0x00000000802667fc in cp_write_global_declarations () at
/home/andreas/clean/gcc-head/gcc/cp/decl2.c:4356
#17 0x0000000080966c06 in compile_file () at
/home/andreas/clean/gcc-head/gcc/toplev.c:558
#18 0x00000000809697e8 in do_compile () at
/home/andreas/clean/gcc-head/gcc/toplev.c:1872
#19 0x00000000809699c4 in toplev_main (argc=32, argv=0x3fffffff138) at
/home/andreas/clean/gcc-head/gcc/toplev.c:1948
#20 0x0000004f6a8ec30c in __libc_start_main () from /lib64/libc.so.6
#21 0x00000000801335aa in _start ()
(gdb)


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

* [Bug bootstrap/57604] LRA related bootstrap comparison failure on s390x --with-arch=zEC12
       [not found] <bug-57604-4@http.gcc.gnu.org/bugzilla/>
  2013-06-14  9:45 ` [Bug bootstrap/57604] LRA related bootstrap comparison failure on s390x --with-arch=zEC12 krebbel at gcc dot gnu.org
@ 2013-06-18  2:31 ` vmakarov at redhat dot com
  2013-06-19  6:45 ` krebbel at gcc dot gnu.org
  2013-07-31  7:49 ` krebbel at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: vmakarov at redhat dot com @ 2013-06-18  2:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57604

Vladimir Makarov <vmakarov at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com

--- Comment #2 from Vladimir Makarov <vmakarov at redhat dot com> ---
Andreas, thanks for checking it and doing the analysis.  I'll try to make a
patch fixing this on this week.


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

* [Bug bootstrap/57604] LRA related bootstrap comparison failure on s390x --with-arch=zEC12
       [not found] <bug-57604-4@http.gcc.gnu.org/bugzilla/>
  2013-06-14  9:45 ` [Bug bootstrap/57604] LRA related bootstrap comparison failure on s390x --with-arch=zEC12 krebbel at gcc dot gnu.org
  2013-06-18  2:31 ` vmakarov at redhat dot com
@ 2013-06-19  6:45 ` krebbel at gcc dot gnu.org
  2013-07-31  7:49 ` krebbel at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: krebbel at gcc dot gnu.org @ 2013-06-19  6:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57604

--- Comment #3 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #2)
Thanks! Btw. the Ada and Java bootstraps started failing with enabling LRA for
S/390 (also without --with-arch=...).  I'll wait for a patch for this PR before
having a closer look. Perhaps the fails are related?!


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

* [Bug bootstrap/57604] LRA related bootstrap comparison failure on s390x --with-arch=zEC12
       [not found] <bug-57604-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-06-19  6:45 ` krebbel at gcc dot gnu.org
@ 2013-07-31  7:49 ` krebbel at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: krebbel at gcc dot gnu.org @ 2013-07-31  7:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57604

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Fixed with r200227:

2013-06-19  Vladimir Makarov  <vmakarov@redhat.com>

    PR bootstrap/57604
    * lra.c (emit_add3_insn, emit_add2_insn): New functions.
    (lra_emit_add): Use the functions.  Add comment about Y as an
    address segment.


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

end of thread, other threads:[~2013-07-31  7:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-57604-4@http.gcc.gnu.org/bugzilla/>
2013-06-14  9:45 ` [Bug bootstrap/57604] LRA related bootstrap comparison failure on s390x --with-arch=zEC12 krebbel at gcc dot gnu.org
2013-06-18  2:31 ` vmakarov at redhat dot com
2013-06-19  6:45 ` krebbel at gcc dot gnu.org
2013-07-31  7:49 ` krebbel 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).