[Bug target/103302] wrong code with -fharden-compares

2022-12-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |12.0 --- Comment #18 from Andrew

[Bug target/103302] wrong code with -fharden-compares

2022-03-24 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 Alexandre Oliva changed: What|Removed |Added Resolution|--- |FIXED Status|REOPENED

[Bug target/103302] wrong code with -fharden-compares

2022-02-25 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #16 from Alexandre Oliva --- Created attachment 52518 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52518=edit Candidate patch The problem is in undo_optional_reloads. Here's a fix I'm testing.

[Bug target/103302] wrong code with -fharden-compares

2022-02-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #15 from CVS Commits --- The master branch has been updated by Alexandre Oliva : https://gcc.gnu.org/g:a9e2ebe839d56416ceaff1a40df54de4890539be commit r12-7384-ga9e2ebe839d56416ceaff1a40df54de4890539be Author: Alexandre Oliva

[Bug target/103302] wrong code with -fharden-compares

2022-02-22 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 Alexandre Oliva changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

[Bug target/103302] wrong code with -fharden-compares

2021-12-08 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 Alexandre Oliva changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug target/103302] wrong code with -fharden-compares

2021-12-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #12 from CVS Commits --- The master branch has been updated by Alexandre Oliva : https://gcc.gnu.org/g:50e8b0c9bca6cdc57804f860ec5311b641753fbb commit r12-5852-g50e8b0c9bca6cdc57804f860ec5311b641753fbb Author: Alexandre Oliva

[Bug target/103302] wrong code with -fharden-compares

2021-12-08 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #11 from Jim Wilson --- FYI I have a patch to re-add the movti pattern to riscv.md which should also fix this and another bug. Kito removed the pattern in 2016 and I was hoping to get an answer from him about why he removed it.

[Bug target/103302] wrong code with -fharden-compares

2021-12-07 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #10 from Alexandre Oliva --- Created attachment 51947 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51947=edit candidate patch under testing Could the fix be as simple as this? The resulting code is awful, with such stuff

[Bug target/103302] wrong code with -fharden-compares

2021-12-03 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #9 from Alexandre Oliva --- Thanks, this alternate testcase confirms my suspicion that the original issue was only going latent. It's clearly a preexisting register allocation issue on riscv, that was latent and that

[Bug target/103302] wrong code with -fharden-compares

2021-12-01 Thread zsojka at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #8 from Zdenek Sojka --- Created attachment 51917 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51917=edit testcase failing with the patch applied The attached unreduced testcase is failing with the patch applied, but is OK

[Bug target/103302] wrong code with -fharden-compares

2021-12-01 Thread zsojka at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #7 from Zdenek Sojka --- (In reply to Alexandre Oliva from comment #6) > https://gcc.gnu.org/pipermail/gcc-patches/2021-December/585963.html appears > to no longer hit this error, though I've only inspected the asm output, not >

[Bug target/103302] wrong code with -fharden-compares

2021-12-01 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #6 from Alexandre Oliva --- https://gcc.gnu.org/pipermail/gcc-patches/2021-December/585963.html appears to no longer hit this error, though I've only inspected the asm output, not tried to run it yet; can anyone confirm?

[Bug target/103302] wrong code with -fharden-compares

2021-11-28 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #5 from Alexandre Oliva --- Hello, Jim, Thanks for the investigation, that's useful. I guess the register allocator shouldn't choose to coalesce registers when there's a clobber afterwards, or it should drop the clobber, since

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #4 from Jim Wilson --- See also bug 103271 which can also be fixed by adding a movti pattern.

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #3 from Jim Wilson --- Maybe the register allocator should remove clobbers of pseudos, instead of turning them into clobbers of hard register pairs. That would eliminate the ambiguity after register allocation. It is also true

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #2

[Bug target/103302] wrong code with -fharden-compares

2021-11-19 Thread aoliva at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 Alexandre Oliva changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org