[Bug tree-optimization/111957] `a ? abs(a) : 0` is not simplified to just abs(a)

2023-10-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111957 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/111957] `a ? abs(a) : 0` is not simplified to just abs(a)

2023-10-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111957 --- Comment #5 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:662655e22dddf5392d9aa67fce45beee980e5454 commit r14-4955-g662655e22dddf5392d9aa67fce45beee980e5454 Author: Andrew Pinski Date: Tu

[Bug tree-optimization/111957] `a ? abs(a) : 0` is not simplified to just abs(a)

2023-10-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111957 Andrew Pinski changed: What|Removed |Added URL||https://gcc.gnu.org/piperma

[Bug tree-optimization/111957] `a ? abs(a) : 0` is not simplified to just abs(a)

2023-10-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111957 --- Comment #3 from Andrew Pinski --- Created attachment 56196 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56196&action=edit patch which I am testing

[Bug tree-optimization/111957] `a ? abs(a) : 0` is not simplified to just abs(a)

2023-10-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111957 --- Comment #2 from Andrew Pinski --- We already have patterns for -a and ~a even: /* X != C1 ? -X : C2 simplifies to -X when -C1 == C2. */ /* X != C1 ? ~X : C2 simplifies to ~X when ~C1 == C2. */ I will add one to handle abs too.

[Bug tree-optimization/111957] `a ? abs(a) : 0` is not simplified to just abs(a)

2023-10-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111957 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-10-24 Status|UNCONFIRM