[Bug tree-optimization/109546] [13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r13-3596-ge7310e24b1c0ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109546 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|13.3|14.0 Status|UNCONFIRMED |RESOLVED --- Comment #8 from Andrew Pinski --- Fixed.
[Bug tree-optimization/109546] [13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r13-3596-ge7310e24b1c0ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109546 Richard Biener changed: What|Removed |Added Target Milestone|13.2|13.3 --- Comment #7 from Richard Biener --- GCC 13.2 is being released, retargeting bugs to GCC 13.3.
[Bug tree-optimization/109546] [13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r13-3596-ge7310e24b1c0ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109546 Richard Biener changed: What|Removed |Added Target Milestone|13.0|13.2 --- Comment #6 from Richard Biener --- GCC 13.1 is being released, retargeting bugs to GCC 13.2.
[Bug tree-optimization/109546] [13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r13-3596-ge7310e24b1c0ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109546 --- Comment #5 from CVS Commits --- The master branch has been updated by Andrew Macleod : https://gcc.gnu.org/g:f828503eeb79ad1f1ada6db7deccc5abcc2f3ca3 commit r14-160-gf828503eeb79ad1f1ada6db7deccc5abcc2f3ca3 Author: Andrew MacLeod Date: Fri Apr 21 15:03:43 2023 -0400 Do not fold ADDR_EXPR conditions leading to builtin_unreachable early. Ranges can not represent globally yet, so we cannot fold these expressions early or we lose the __builtin_unreachable information. PR tree-optimization/109546 gcc/ * tree-vrp.cc (remove_unreachable::remove_and_update_globals): Do not fold conditions with ADDR_EXPR early. gcc/testsuite/ * gcc.dg/pr109546.c: New.
[Bug tree-optimization/109546] [13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r13-3596-ge7310e24b1c0ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109546 --- Comment #4 from Andrew Macleod --- And I think the first part of this is a duplicate of another PR from GCC12 time (I dont know which one) whereby we are not making staticly initialized values available in main(). so VRP never sees that d == , and can do nothing with the first condition, thus leaving the call to __assert_fail.
[Bug tree-optimization/109546] [13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r13-3596-ge7310e24b1c0ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109546 --- Comment #3 from Andrew Macleod --- Patch in testing. when deciding to fold condition of builtin_unreachable, VRP is failing to recognize that given if (ptr == ) __builtin_unreachable () is not a representable range, and thus should not be eliminated early even though it satisfies the other criteria. it just sees it as a symbolic value == CONSTANT and thinks its smart enough when it isn't.
[Bug tree-optimization/109546] [13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r13-3596-ge7310e24b1c0ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109546 --- Comment #2 from Andrew Macleod --- *** Bug 109588 has been marked as a duplicate of this bug. ***
[Bug tree-optimization/109546] [13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r13-3596-ge7310e24b1c0ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109546 Martin Liška changed: What|Removed |Added CC||amacleod at redhat dot com, ||marxin at gcc dot gnu.org Summary|[13/14 Regression] Missed |[13/14 Regression] Missed |Dead Code Elimination when |Dead Code Elimination when |using __builtin_unreachable |using __builtin_unreachable ||since ||r13-3596-ge7310e24b1c0ca --- Comment #1 from Martin Liška --- Started with r13-3596-ge7310e24b1c0ca.