[Bug target/96017] Powerpc suboptimal register spill in likely path

2023-11-24 Thread jskumari at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #14 from Surya Kumari Jangala --- Instead of using a non-volatile register to hold the value of foo, a volatile register (r9) is assigned to hold foo. This avoids setting up the stack frame in the fast path.

[Bug target/96017] Powerpc suboptimal register spill in likely path

2023-11-24 Thread jskumari at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #13 from Surya Kumari Jangala --- With the patch at https://gcc.gnu.org/pipermail/gcc-patches/2023-October/631849.html, the testcase gets shrink wrapped. This is the assembly produced: addis 2,12,.TOC.-.LCF0@ha addi

[Bug target/96017] Powerpc suboptimal register spill in likely path

2021-07-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 Richard Biener changed: What|Removed |Added Target Milestone|11.2|---

[Bug target/96017] Powerpc suboptimal register spill in likely path

2021-04-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 Jakub Jelinek changed: What|Removed |Added Target Milestone|11.0|11.2 --- Comment #12 from Jakub Jelinek

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-02 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #11 from Segher Boessenkool --- (In reply to Peter Bergner from comment #9) > (In reply to Peter Bergner from comment #8) > > At first, I thought that split_live_ranges_for_shrink_wrap() split this > > nicely, but what I found is

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-02 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #10 from Segher Boessenkool --- (In reply to Peter Bergner from comment #6) > Right, that's why we need to add the copies before RA, so we don't have to > look for unused regs. But we don't want to add the copies too early just >

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #9 from Peter Bergner --- (In reply to Peter Bergner from comment #8) > At first, I thought that split_live_ranges_for_shrink_wrap() split this > nicely, but what I found is that IRA assigned a volatile register to a > pseudo that is

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #8 from Peter Bergner --- Interesting, if I rewrite the test case so that foo is a parameter and not a global var, then we get the code we want: extern void slowpath(int *); int test (int *val, int foo) { int ret = foo; if

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #7 from Peter Bergner --- (In reply to Peter Bergner from comment #6) > There is ira.c:split_live_ranges_for_shrink_wrap(). I'll have a look to see > why it's not catching this test case. So it looks like it only splits pseudos

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #6 from Peter Bergner --- (In reply to Segher Boessenkool from comment #5) > But it is r31 already before > shrink-wrapping -- we need some renaming / copying of registers (like > in Peter's code) to get rid of it. In an example

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 Segher Boessenkool changed: What|Removed |Added Last reconfirmed||2020-07-01

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #4 from Peter Bergner --- To be pedantic, "val" is assigned r3, the incoming arg reg. The compiler temporary that holds "*val" is assigned r9 which is a volatile register. The only non-volatile in use is r31 which was assigned to

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread npiggin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #3 from Nicholas Piggin --- This is possibly a more targeted and simpler test case for at least one of the problems in bug 84443. I would like to re-test that case after this one is solved if it's not an obvious duplicate.

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 --- Comment #2 from Bill Schmidt --- Nick reports same behavior at -O3.

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 Bill Schmidt changed: What|Removed |Added Target Milestone|9.4 |11.0

[Bug target/96017] Powerpc suboptimal register spill in likely path

2020-07-01 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017 Bill Schmidt changed: What|Removed |Added CC||segher at gcc dot gnu.org,