On 8/26/26 11:12 PM, Dipesh Sharma wrote:
[...]+/* { 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 gcc/ChangeLog: PR tree-optimization/126690. * match.pd: Add patterns to fold CPROJ when nested inside CPROJ or CABS. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr126690.c: New test.
Thanks. I've pushed this to the trunk. jeff
