[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #12 from Jeffrey A. Law --- Just to confirm. Yes, that patch fixed the problem.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #11 from Jakub Jelinek --- Assuming fixed. If not, please reopen. That said, arc is neither primary nor secondary, so it shouldn't be P1 but P4.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #10 from CVS Commits --- The master branch has been updated by Robin Dapp : https://gcc.gnu.org/g:2240ebd8e46e098f972a662d0aad85348b304889 commit r12-7420-g2240ebd8e46e098f972a662d0aad85348b304889 Author: Robin Dapp Date: Mon Feb 7 08:39:41 2022 +0100 arc: Fix for new ifcvt behavior [PR104154] ifcvt now passes a CC-mode "comparison" to backends. This patch simply returns from gen_compare_reg () in that case since nothing needs to be prepared anymore. gcc/ChangeLog: PR rtl-optimization/104154 * config/arc/arc.cc (gen_compare_reg): Return the CC-mode comparison ifcvt passed us.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 Claudiu Zissulescu changed: What|Removed |Added CC||claziss at gmail dot com --- Comment #9 from Claudiu Zissulescu --- I don't know why I haven't been notified for this PR, and I went a bit ahead and pushed a patch on the subject: https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590929.html I am bootstrapping and testing Robin's patch as well. Thanks!
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #8 from Jeffrey A. Law --- So the updated patch fixes the arc build regressions. I haven't looked at the thread with Segher, but I will as soon as I can. Mostly just wanted to let you know that the updated patch does indeed get the port building again.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #7 from rdapp at linux dot ibm.com --- This diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc index 8cc173519ab..e9ea90631a2 100644 --- a/gcc/config/arc/arc.cc +++ b/gcc/config/arc/arc.cc @@ -2254,6 +2254,8 @@ gen_compare_reg (rtx comparison, machine_mode omode) cmode = GET_MODE (x); + if (GET_MODE_CLASS (cmode) == MODE_CC) +return comparison; if (cmode == VOIDmode) cmode = GET_MODE (y); gcc_assert (cmode == SImode || cmode == SFmode || cmode == DFmode); should be better and fixes the test case for me. Btw Segher is very much not in favor of this approach/patch and argues that reusing the comparison is the wrong thing to do as a "cc comparison" is not a comparison but rather the result of a comparison (PR104335).
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 Jeffrey A. Law changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2022-02-13 --- Comment #6 from Jeffrey A. Law --- So the patch gets the first testcase working, but we fail shortly thereafter in a similar way on another testcase.Compile with -O2 using an arc-elf cross compiler.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #5 from Jeffrey A. Law --- Created attachment 52432 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52432=edit Testcase #2
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #4 from Jeffrey A. Law --- Given we've run this code on a pretty wide variety of targets, I'm not too concerned. The arc issue was the last one I'm aware of related to your ifcvt changes.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #3 from rdapp at linux dot ibm.com --- Power(10) also saw a similar problem where the backend was not prepared to handle what we are passing now. I'm starting to become a bit concerned now that more backends might (latently) not be able to deal with this.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #2 from rdapp at linux dot ibm.com --- Yes, your guess was right again. We ICE here: gcc_assert (cmode == SImode || cmode == SFmode || cmode == DFmode); but cmode == E_CCmode with the patch. This already helps and the resulting sequences are less expensive: diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc index 8cc173519ab..d802c45f9af 100644 --- a/gcc/config/arc/arc.cc +++ b/gcc/config/arc/arc.cc @@ -2254,6 +2254,8 @@ gen_compare_reg (rtx comparison, machine_mode omode) cmode = GET_MODE (x); + if (cmode == CCmode) +return comparison; if (cmode == VOIDmode) cmode = GET_MODE (y); gcc_assert (cmode == SImode || cmode == SFmode || cmode == DFmode); As we are trying to ifcvt very long sequences (5+ insns) the overall outcome does not change, though.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 --- Comment #1 from rdapp at linux dot ibm.com --- Strange, I didn't receive a mail/notification for this PR all, otherwise I would have looked into it earlier. This has been happening a few times lately, grml. Looking into it now.
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 Richard Biener changed: What|Removed |Added Priority|P3 |P1
[Bug rtl-optimization/104154] [12 Regression] Another ICE due to recent ifcvt changes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104154 Andrew Pinski changed: What|Removed |Added Keywords||ice-on-valid-code Target Milestone|--- |12.0 Target||arc-elf