[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2023-08-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 --- Comment #9 from Andrew Pinski --- (In reply to Andrew Pinski from comment #8) > cmp_8 = -_2; > _3 = cmp_8 & a_6(D); > We convert that into: > _2 * a_6(D); > > And then have: > _11 = _2 + -1; > _5 = b_7(D) & _11; > > This could be co

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2023-08-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 --- Comment #8 from Andrew Pinski --- cmp_8 = -_2; _3 = cmp_8 & a_6(D); We convert that into: _2 * a_6(D); And then have: _11 = _2 + -1; _5 = b_7(D) & _11; This could be convert into: (_11 ^ 1) * b_7(D) ``` (simplify (bit_and:c (conve

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2023-08-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 Bug 95906 depends on bug 54525, which changed state. Bug 54525 Summary: Recognize (vec_)cond_expr in mask operation https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54525 What|Removed |Added

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2023-08-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 Andrew Pinski changed: What|Removed |Added Depends on||110949 --- Comment #7 from Andrew Pinski

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2023-06-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 --- Comment #6 from Andrew Pinski --- (In reply to Andrew Pinski from comment #5) > Created attachment 55295 [details] > Patch to handle the scalar version I should we already handle: ``` int f3(int a, int b) { int cmp = -(a > b); int cm

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2023-06-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 --- Comment #5 from Andrew Pinski --- Created attachment 55295 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55295&action=edit Patch to handle the scalar version

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2023-06-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 Andrew Pinski changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2021-07-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 Andrew Pinski changed: What|Removed |Added CC||pinskia at gcc dot gnu.org Sev

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2020-08-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 --- Comment #3 from Marc Glisse --- With the patch (which only affects vectors), f becomes (a>b)?a:b. It should be easy to add the corresponding transform to MAX_EXPR in match.pd.

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2020-08-05 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 --- Comment #2 from CVS Commits --- The master branch has been updated by Marc Glisse : https://gcc.gnu.org/g:229752afe3156a3990dacaedb94c76846cebf132 commit r11-2577-g229752afe3156a3990dacaedb94c76846cebf132 Author: Marc Glisse Date: Wed Au

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2020-06-26 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 --- Comment #1 from Marc Glisse --- I'd say generate a (vec_)cond_expr, not directly a max. That is, replace the comparison with any truth_valued_p (hmm, that function probably stopped working for vectors when all comparisons were wrapped in vec_

[Bug tree-optimization/95906] Failure to recognize max pattern with mask

2020-06-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95906 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Keywords|