[Bug rtl-optimization/117868] [avr][lra] Wrong code with -mlra in simd-1.c

2025-01-11 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117868 Denis Chertykov changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug rtl-optimization/117868] [avr][lra] Wrong code with -mlra in simd-1.c

2025-01-11 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117868 --- Comment #4 from Denis Chertykov --- In brief: this is an LRA bug derived from reuse spilling slots after frame pointer spilling. The slot was created for QImode (1 byte) and it was reused after spilling of the frame pointer for TImode regist

[Bug rtl-optimization/117868] [avr][lra] Wrong code with -mlra in simd-1.c

2025-01-11 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117868 --- Comment #3 from Denis Chertykov --- Created attachment 60116 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60116&action=edit IRA dump file: simd-t.c.319r.ira

[Bug rtl-optimization/117868] [avr][lra] Wrong code with -mlra in simd-1.c

2025-01-11 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117868 --- Comment #2 from Denis Chertykov --- Created attachment 60115 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60115&action=edit LRA dump file: simd-t.c.320r.reload

[Bug rtl-optimization/117868] [avr][lra] Wrong code with -mlra in simd-1.c

2025-01-11 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117868 --- Comment #1 from Denis Chertykov --- Created attachment 60114 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60114&action=edit Reduced test case

[Bug middle-end/56183] [meta-bug][avr] Problems with register allocation

2024-12-13 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56183 Bug 56183 depends on bug 116778, which changed state. Bug 116778 Summary: [lra][avr] Wrong code with -mlra (bitfld-lra.c) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 What|Removed |Added -

[Bug target/113934] Switch avr to LRA

2024-12-13 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113934 Bug 113934 depends on bug 116778, which changed state. Bug 116778 Summary: [lra][avr] Wrong code with -mlra (bitfld-lra.c) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 What|Removed |Added ---

[Bug rtl-optimization/116778] [lra][avr] Wrong code with -mlra (bitfld-lra.c)

2024-12-13 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 Denis Chertykov changed: What|Removed |Added Resolution|--- |FIXED Status|WAITING

[Bug rtl-optimization/116778] [lra][avr] Wrong code with -mlra (bitfld-lra.c)

2024-12-07 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 Denis Chertykov changed: What|Removed |Added Status|NEW |WAITING

[Bug rtl-optimization/116778] [lra][avr] Wrong code with -mlra (bitfld-lra.c)

2024-12-07 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 --- Comment #7 from Denis Chertykov --- Committed a partial solution. https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671030.html

[Bug rtl-optimization/116778] [lra][avr] Wrong code with -mlra (bitfld-lra.c)

2024-12-05 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 --- Comment #5 from Denis Chertykov --- Proposed patch https://gcc.gnu.org/pipermail/gcc-patches/2024-December/670949.html

[Bug rtl-optimization/116778] [lra][avr] Wrong code with -mlra (bitfld-lra.c)

2024-12-05 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 --- Comment #4 from Denis Chertykov --- The bug appears in LRA after rematerialization pass while creating live ranges. File lra.cc: * /* Now we know what pseudos should be spill

[Bug rtl-optimization/116778] [lra][avr] Wrong code with -mlra (bitfld-lra.c)

2024-12-05 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 --- Comment #3 from Denis Chertykov --- Created attachment 59796 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59796&action=edit Modified test case "bf.c" I worked with a modified test case (bf.c): struct { unsigned long long u33 : 33

[Bug rtl-optimization/116778] [lra][avr] Wrong code with -mlra (bitfld-lra.c)

2024-12-05 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116778 Denis Chertykov changed: What|Removed |Added CC||denisc at gcc dot gnu.org --- Comment

[Bug rtl-optimization/116781] [lra][avr] internal compiler error: in cselib_invalidate_regno, at cselib.cc:2545

2024-11-15 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116781 --- Comment #4 from Denis Chertykov --- (In reply to Georg-Johann Lay from comment #2) > Created attachment 59602 [details] > pr116781-gjl.diff > > (In reply to Denis Chertykov from comment #1) > > Probably we have a wring definition of "*table

[Bug rtl-optimization/116781] [lra][avr] internal compiler error: in cselib_invalidate_regno, at cselib.cc:2545

2024-11-15 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116781 --- Comment #3 from Denis Chertykov --- (In reply to Georg-Johann Lay from comment #2) > Created attachment 59602 [details] > pr116781-gjl.diff > > (In reply to Denis Chertykov from comment #1) > > Probably we have a wring definition of "*table

[Bug target/113934] Switch avr to LRA

2024-11-14 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113934 Bug 113934 depends on bug 117191, which changed state. Bug 117191 Summary: [avr][dse2][lra] wrong dead store elimination https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 What|Removed |Added -

[Bug rtl-optimization/117191] [avr][dse2][lra] wrong dead store elimination

2024-11-14 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 Denis Chertykov changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug rtl-optimization/116781] [lra][avr] internal compiler error: in cselib_invalidate_regno, at cselib.cc:2545

2024-11-14 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116781 Denis Chertykov changed: What|Removed |Added CC||denisc at gcc dot gnu.org --- Comment

[Bug rtl-optimization/117191] [avr][dse2][lra] wrong dead store elimination

2024-11-13 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 --- Comment #10 from denisc at gcc dot gnu.org --- Proposed patch. I just mark a CLOBBER insn with pseudo spilled to memory for removing it later together with LRA temporary CLOBBER insns. The patch is simple. On x86_64, it bootstraps+regtests

[Bug rtl-optimization/117191] [avr][dse2][lra] wrong dead store elimination

2024-11-11 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 --- Comment #9 from denisc at gcc dot gnu.org --- Created attachment 59576 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59576&action=edit pro_and_epilogue pass dump file (pre dse2)

[Bug rtl-optimization/117191] [avr][dse2][lra] wrong dead store elimination

2024-11-10 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 --- Comment #8 from denisc at gcc dot gnu.org --- I forgot to add condition for "except those that refer to the return value" The patch: diff --git a/gcc/lra-spills.cc b/gcc/lra-spills.cc index c149c3388cd..2f86ec0026c 100644 --- a/gcc/lra-spil

[Bug rtl-optimization/117191] [avr][dse2][lra] wrong dead store elimination

2024-11-10 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 --- Comment #6 from denisc at gcc dot gnu.org --- The patch: (In reply to denisc from comment #4) > (In reply to denisc from comment #0) > > Created attachment 59370 [details] > > dse2 pass dump file > > > > Failed testcase: > > $ make -k check

[Bug rtl-optimization/117191] [avr][dse2][lra] wrong dead store elimination

2024-11-10 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 --- Comment #7 from denisc at gcc dot gnu.org --- I'm sorry for the strange previous comment. The right one. Probably I found a bug. The bug appears after the dse2 pass. The dse2 pass removes necessary insns. (ie insn 554) They are removed beca

[Bug rtl-optimization/117191] [avr][dse2][lra] wrong dead store elimination

2024-10-28 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 --- Comment #4 from denisc at gcc dot gnu.org --- (In reply to denisc from comment #0) > Created attachment 59370 [details] > dse2 pass dump file > > Failed testcase: > $ make -k check-gcc RUNTESTFLAGS="--target_board=atmega128-sim > --tool_opts

[Bug rtl-optimization/116780] [lra][avr] internal compiler error: output_operand: address operand requires constraint for X, Y, or Z register

2024-10-20 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116780 --- Comment #11 from denisc at gcc dot gnu.org --- (In reply to Segher Boessenkool from comment #8) > (In reply to denisc from comment #2) > > Comment on attachment 59393 [details] > > Simplified testcase > > > > void > > f () > > { > > volati

[Bug rtl-optimization/116780] [lra][avr] internal compiler error: output_operand: address operand requires constraint for X, Y, or Z register

2024-10-19 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116780 --- Comment #7 from denisc at gcc dot gnu.org --- Clarification for simplified test case: 1. frame size is 0 (because a declaration of a local array has a zero size); 2. we have a local variable which can be addressable (althought it have a zero

[Bug rtl-optimization/116780] [lra][avr] internal compiler error: output_operand: address operand requires constraint for X, Y, or Z register

2024-10-19 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116780 --- Comment #6 from denisc at gcc dot gnu.org --- At least, our main problem is that we have a frame pointer usage without frame size.

[Bug rtl-optimization/116780] [lra][avr] internal compiler error: output_operand: address operand requires constraint for X, Y, or Z register

2024-10-19 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116780 --- Comment #5 from denisc at gcc dot gnu.org --- (In reply to Georg-Johann Lay from comment #3) > Maybe this one is related to the fact that LRA doesn't set strict when it is > in strict-RTL mode? For example, with your latest test case: > > $

[Bug rtl-optimization/116780] [lra][avr] internal compiler error: output_operand: address operand requires constraint for X, Y, or Z register

2024-10-19 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116780 --- Comment #4 from denisc at gcc dot gnu.org --- After IRA we have: --- ;; bb 2 artificial_defs: { } ;; bb 2 artificial_uses: { u-1(28){ }u-1(32){ }u-1(34){ }} ;; lr  in  28 [r28] 29 [r29] 32 [__SP_L__] 34 [ar

[Bug rtl-optimization/116780] [lra][avr] internal compiler error: output_operand: address operand requires constraint for X, Y, or Z register

2024-10-19 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116780 --- Comment #2 from denisc at gcc dot gnu.org --- Comment on attachment 59393 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59393 Simplified testcase void f () { volatile char c[0]; c[0] = 0; }

[Bug rtl-optimization/116780] [lra][avr] internal compiler error: output_operand: address operand requires constraint for X, Y, or Z register

2024-10-19 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116780 denisc at gcc dot gnu.org changed: What|Removed |Added CC||denisc at gcc dot gnu.org --

[Bug rtl-optimization/117191] New: [avr][dse2][lra] wrong dead store elimination

2024-10-17 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117191 Bug ID: 117191 Summary: [avr][dse2][lra] wrong dead store elimination Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: testsuite-fail, wrong-code Severity: norma

[Bug rtl-optimization/116550] [lra][avr] internal compiler error: in final_scan_insn_1, at final.cc:2807

2024-10-17 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116550 --- Comment #24 from denisc at gcc dot gnu.org --- (In reply to Georg-Johann Lay from comment #23) > (In reply to Georg-Johann Lay from comment #22) > > Unfortunately, one of them [lra-pr116550-2.c} is failing > > with the patch and -mlra, wherea

[Bug rtl-optimization/116550] [lra][avr] internal compiler error: in final_scan_insn_1, at final.cc:2807

2024-10-16 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116550 --- Comment #18 from denisc at gcc dot gnu.org --- (In reply to Georg-Johann Lay from comment #17) > (In reply to denisc from comment #15) > > I sent a patch. > > What might help is to CC the respective maintainer as listed in MAINTAINERS. Done

[Bug rtl-optimization/116550] [lra][avr] internal compiler error: in final_scan_insn_1, at final.cc:2807

2024-10-16 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116550 --- Comment #15 from denisc at gcc dot gnu.org --- (In reply to Segher Boessenkool from comment #13) > Yeah :-) So post an actual patch, to gcc-patches@? :-) PING ... I sent a patch.

[Bug rtl-optimization/116550] [lra][avr] internal compiler error: in final_scan_insn_1, at final.cc:2807

2024-10-10 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116550 --- Comment #14 from denisc at gcc dot gnu.org --- I sent a patch "[PATCH][LRA][PR116550] Reuse scratch registers generated by LRA"

[Bug rtl-optimization/116550] [lra][avr] internal compiler error: in final_scan_insn_1, at final.cc:2807

2024-10-02 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116550 --- Comment #10 from denisc at gcc dot gnu.org --- Created attachment 59265 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59265&action=edit Reduced test case I have reduced the test case. The bug in calculation of 'k = i & j;' It have to

[Bug rtl-optimization/116550] [lra][avr] internal compiler error: in final_scan_insn_1, at final.cc:2807

2024-09-25 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116550 --- Comment #4 from denisc at gcc dot gnu.org --- Explanation. Test file: udivmoddi.c problem insn: 484 Before LRA pass we have: (insn 484 483 485 72 (parallel [ (set (reg/v:SI 143 [ __q1 ]) (plus:SI (reg/v:SI 143 [

[Bug rtl-optimization/116550] [lra][avr] internal compiler error: in final_scan_insn_1, at final.cc:2807

2024-09-25 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116550 --- Comment #3 from denisc at gcc dot gnu.org --- Created attachment 59192 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59192&action=edit LRA dump file

[Bug rtl-optimization/116550] [lra][avr] internal compiler error: in final_scan_insn_1, at final.cc:2807

2024-09-21 Thread denisc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116550 denisc at gcc dot gnu.org changed: What|Removed |Added CC||denisc at gcc dot gnu.org --