[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2 since r12-8078-ga42aa68bf1ad745a

2022-12-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 --- Comment #8 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5c17adfb5d08e34da7a7f234dfc2ed1f0aaadaa9 commit r13-4845-g5c17adfb5d08e34da7a7f234dfc2ed1f0aaadaa9 Author: Jakub Jelinek Date: T

[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2 since r12-8078-ga42aa68bf1ad745a

2022-12-21 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2 since r12-8078-ga42aa68bf1ad745a

2022-12-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 --- Comment #6 from Richard Biener --- replace_phi_edge_with_variable assumes we replace things with the same value, if the new transform does something different because of the _uses_ of the value then it has to make sure to not copy range info

[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2 since r12-8078-ga42aa68bf1ad745a

2022-12-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 --- Comment #5 from Richard Biener --- But we end up with [local count: 1073741824]: b.1_1 = b; if (b.1_1 != 0) goto ; [50.00%] else goto ; [50.00%] [local count: 536870913]: iftmp.3_14 = d; [local count: 966367640]:

[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2 since r12-8078-ga42aa68bf1ad745a

2022-12-21 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 --- Comment #4 from Jakub Jelinek --- The phiopt2 optimization is: # iftmp.3_10 = PHI - if (iftmp.3_10 != 0) -goto ; [56.25%] - else -goto ; [43.75%] - - [local count: 536870913]: - - [local count: 1073741824]: - # iftmp.2_9 =

[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2 since r12-8078-ga42aa68bf1ad745a

2022-12-19 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 --- Comment #3 from Jakub Jelinek --- Testcase without includes: bool a, b; int d, c; const int & foo (const int &f, const int &g) { return !f ? f : g; } __attribute__((noipa)) void bar (int) { } int main () { c = foo (b, 0) > ((b ? d : b

[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2 since r12-8078-ga42aa68bf1ad745a

2022-12-19 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 Martin Liška changed: What|Removed |Added Keywords|needs-bisection | Summary|[12/13 Regression] W

[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2

2022-12-19 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 Richard Biener changed: What|Removed |Added Keywords||needs-bisection Priority|P3

[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2

2022-12-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |12.3 Last reconfirmed|