[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-11-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #14 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:4b3874d803e7961f38b22fa798517a63171bb985 commit r13-3904-g4b3874d803e7961f38b22fa798517a63171bb985 Author: Richard Biener Date:

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #12 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:fc8d9e4497032dd295aac9414042163f92250b77 commit r12-8012-gfc8d9e4497032dd295aac9414042163f92250b77 Author: Richard Biener Date:

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 Richard Biener changed: What|Removed |Added Attachment #52744|0 |1 is obsolete|

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #10 from Richard Biener --- (In reply to Richard Biener from comment #9) > Created attachment 52745 [details] > avoid combining the conditions > > Like this prototype which fixes the testcase and avoids combining from stmts > define

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #9 from Richard Biener --- Created attachment 52745 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52745&action=edit avoid combining the conditions Like this prototype which fixes the testcase and avoids combining from stmts d

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #8 from Richard Biener --- Created attachment 52744 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52744&action=edit patch to rewrite undefined overflow stmts Here's the initial patch, not solving the testcase.

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #7 from Richard Biener --- (In reply to Richard Biener from comment #4) > Hmm, I think the error happens earlier already when we simplify > > _2 < _16 && (_4 > _2) to _2 < _4 > > I do have a patch to do the rewrite into defined ove

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #6 from Jakub Jelinek --- I mean ... is equivalent to a < c.

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #5 from Jakub Jelinek --- If so, that must be still during ifcombine though. Because what I see is that we have effectively MIN_EXPR + large_cst> until threadfull1, which decides to thread it based on the a < c comparison, if a < c,

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #4 from Richard Biener --- Hmm, I think the error happens earlier already when we simplify _2 < _16 && (_16 + 5713568809962283044 > _2) to _2 < _4 I do have a patch to do the rewrite into defined overflow which definitely fixes a l

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 Richard Biener changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 --- Comment #2 from Jakub Jelinek --- long long int c = 3623214276426624192LL; unsigned short b; char a = 42; const long long &min(const long long &x, const long long &y) { return x < y ? x : y; } __attribute__((noipa)) void test() { b = min(a,

[Bug tree-optimization/105142] [12 Regression] Wrong code with -O2 since r12-2591

2022-04-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105142 Jakub Jelinek changed: What|Removed |Added Ever confirmed|0 |1 Summary|[12 Regression] Wr