public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65496] New: ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318 with -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0
@ 2015-03-20 16:55 zsojka at seznam dot cz
2015-03-20 18:00 ` [Bug target/65496] " jakub at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2015-03-20 16:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65496
Bug ID: 65496
Summary: ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318
with -O3 -fsched2-use-superblocks -mavx512dq
--param=max-pending-list-length=0
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Created attachment 35075
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35075&action=edit
reduced testcase
Compiler output:
$ gcc -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0
testcase.c
testcase.c: In function 'foo':
testcase.c:6:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.c:2318
}
^
0x8843d0 maybe_record_trace_start
/mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:2318
0x885348 scan_trace
/mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:2496
0x885c9a create_cfi_notes
/mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:2650
0x885c9a execute_dwarf2_frame
/mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:3006
0x885c9a execute
/mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:3486
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ gcc -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-221530-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df
--enable-languages=c,c++,lto,fortran
--prefix=/mnt/svn/gcc-trunk/binary-221530-lto-fortran-checking-yes-rtl-df/
--without-cloog --without-ppl
Thread model: posix
gcc version 5.0.0 20150320 (experimental) (GCC)
Tested revisions:
r221530 - ICE
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/65496] ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318 with -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0
2015-03-20 16:55 [Bug target/65496] New: ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318 with -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0 zsojka at seznam dot cz
@ 2015-03-20 18:00 ` jakub at gcc dot gnu.org
2015-03-20 18:10 ` jakub at gcc dot gnu.org
2015-03-23 15:57 ` rth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-20 18:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65496
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-20
CC| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r217331. Not really a regression, as GCC 4.9 doesn't have
-mavx512dq support.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/65496] ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318 with -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0
2015-03-20 16:55 [Bug target/65496] New: ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318 with -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0 zsojka at seznam dot cz
2015-03-20 18:00 ` [Bug target/65496] " jakub at gcc dot gnu.org
@ 2015-03-20 18:10 ` jakub at gcc dot gnu.org
2015-03-23 15:57 ` rth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-20 18:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65496
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And the problem is that with these weirdo scheduling options the scheduler
schedules the
(insn/f:TI 620 60 37 2 (set (reg:DI 39 r10)
(plus:DI (reg/f:DI 7 sp)
(const_int 8 [0x8]))) pr65496.c:3 214 {*leadi}
(nil))
instruction before the shrink-wrapping conditional jump:
(jump_insn:TI 38 45 43 2 (set (pc)
(if_then_else (eq (reg:CCZ 17 flags)
(const_int 0 [0]))
(label_ref:DI 645)
(pc))) pr65496.c:4 613 {*jcc_1}
(expr_list:REG_DEAD (reg:CCZ 17 flags)
(int_list:REG_BR_PROB 900 (nil)))
-> 645)
At the end of the function we have:
(insn/f:TI 641 640 645 40 (set (reg/f:DI 7 sp)
(plus:DI (reg:DI 39 r10)
(const_int -8 [0xfffffffffffffff8]))) pr65496.c:6 214 {*leadi}
(expr_list:REG_DEAD (reg:DI 39 r10)
(expr_list:REG_CFA_DEF_CFA (plus:DI (reg/f:DI 7 sp)
(const_int 8 [0x8]))
(nil))))
(code_label 645 641 644 41 106 "" [1 uses])
(note 644 645 663 41 [bb 41] NOTE_INSN_BASIC_BLOCK)
(jump_insn 663 644 643 41 (parallel [
(simple_return)
(unspec [
(const_int 0 [0])
] UNSPEC_REP)
]) pr65496.c:6 682 {simple_return_internal_long}
(nil))
(barrier 643 663 355)
And the problem is that because the r10 = rsp + 8 frame related instruction is
moved before the shrink-wrapping jump we assume CFA is in r10 + 0, but before
fallthru into the return we have a CFA restore note to use r8 + 8 again as CFA
(not really needed in this case, but desirable for the case when the r10 = rsp
+ 8 instruction isn't moved.
Richard, any thoughts what to do about this? Avoid scheduling frame related
instructions across conditional jumps? Something else?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/65496] ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318 with -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0
2015-03-20 16:55 [Bug target/65496] New: ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318 with -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0 zsojka at seznam dot cz
2015-03-20 18:00 ` [Bug target/65496] " jakub at gcc dot gnu.org
2015-03-20 18:10 ` jakub at gcc dot gnu.org
@ 2015-03-23 15:57 ` rth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rth at gcc dot gnu.org @ 2015-03-23 15:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65496
--- Comment #3 from Richard Henderson <rth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Richard, any thoughts what to do about this? Avoid scheduling frame related
> instructions across conditional jumps? Something else?
Yes, for the short term that will have to be a requirement in order to
keep the unwind info happy.
Something for the next stage1 is
(1) Avoiding the use of bare /f, and thus also REG_FRAME_RELATED_EXPR,
using instead always REG_CFA_*. I suspect that this insn 620 shouldn't
actually be frame related at all, but is a part of a larger dwarf
expression we're intending to construct.
(2) Once we have an unambiguous note for everything, we can allow these
insns to be scheduled across a conditional jump if we strip and collect
those notes and place them after the conditional jump, probably on a
fake insn like
(insn/f (use (const_int 0))
(expr-list:REG_CFA_...
(expr-list:REG_CFA_...
(expr-list:REG_CFA_...))))
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-23 15:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 16:55 [Bug target/65496] New: ICE: in maybe_record_trace_start, at dwarf2cfi.c:2318 with -O3 -fsched2-use-superblocks -mavx512dq --param=max-pending-list-length=0 zsojka at seznam dot cz
2015-03-20 18:00 ` [Bug target/65496] " jakub at gcc dot gnu.org
2015-03-20 18:10 ` jakub at gcc dot gnu.org
2015-03-23 15:57 ` rth 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).