[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|---

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 --- Comment #10 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:82502b5c3463bde98d4b7ffb9ecef9b123799ed1 commit r14-813-g82502b5c3463bde98d4b7ffb9ecef9b123799ed1 Author: Andrew Pinski Date: Sa

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 Andrew Pinski changed: What|Removed |Added Keywords||patch URL|

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 --- Comment #8 from Andrew Pinski --- Created attachment 55079 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55079&action=edit Patch which I am testing

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Pinski from comment #6) > I need to double check if == 1 will show up here though. The only thing we know about __builtin_signbit is that is 0 or non-zero. The exact value is unspecified

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 --- Comment #6 from Andrew Pinski --- (In reply to Jakub Jelinek from comment #4) > Or does match.pd try to invert all the COND_EXPR conditions and swap the > operands? match does not try but phiopt does in gimple_simplify_phiopt . Or even som

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 --- Comment #5 from Jakub Jelinek --- Or canonicalize COND_EXPRs such that only ne and not eq appears in condition (and similarly to other comparisons)?

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 --- Comment #3 from Andrew Pinski --- Should add this one too: (simplify (cond (ne (SIGNBIT @0) zero_p@1) @0 (neg @0)) (neg (abs @0)))

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

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

[Bug tree-optimization/109829] Optimizing __builtin_signbit(x) ? -x : x or abs for FP

2023-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Last reconfirmed|