[Bug tree-optimization/126690] Missed folding of nested cproj, cabs of a cproj
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 31 23:19:16 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126690
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:
https://gcc.gnu.org/g:0e0ddac529e215ea605541f8613a0777b6f533a6
commit r17-3801-g0e0ddac529e215ea605541f8613a0777b6f533a6
Author: Dipesh Sharma <Dipesh.Sharma@amd.com>
Date: Mon Aug 31 17:18:35 2026 -0600
[PATCH] match.pd: Fold CPROJ when nested inside CPROJ or CABS [PR 126690].
>> +/* { dg-final { scan-tree-dump-not {__builtin_cabsl \(__builtin_cprojl}
"optimized" } } */
> This testcase will pass even before your match.pd patch.
> Maybe the best way to write this testcase is count the number of
> cabs/cproj used.
Mine, in GIMPLE SSA there wont be nested call to match the above testcase.
I have updated the patch, PFA it below.
Thanks,
Dipesh:q
PR tree-optimization/126690
gcc/ChangeLog:
* match.pd: Add patterns to fold CPROJ when nested inside CPROJ or
CABS.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr126690.c: New test.
More information about the Gcc-bugs
mailing list