https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35603
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Target Milestone|--- |11.0 --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So for this specific testcase, this was solved in GCC 11 by turning the sequence of ifs into a switch. BUT I am not 100% sure it solves the original request. Though the only way for the ifs to be truely mutually exclusive is for them to be based on the same variable. So yes this was solved by changing it into a switch and then profiling based on that.