Hi, I have added the testcase for PR79966 to test that tp_sum is inlined becuase it matters for performance of that benchmark. Sadly it is not inlined anymore because it was inlined due to accounting bug I fixed in January.
I do not see how to make inliner to do the inlining here except for setting --param inline-min-speedup=2 which is bit extreme (though i tested estting it to 5 and it does not add too much of code size). Inliner does not see why inlining the function is profitable and previously it did so because of missing multiplication scaling statement time by iteration count. tp_sum has loop iterating 16 times which was accounted as loop iterating once making whole funtion chepaer and making inlining seem more profitable. OK? Honza PR ipa/88711 * gfortran.dg/pr79966.f90: Xfail for time being. Index: ../../gcc/testsuite/gfortran.dg/pr79966.f90 =================================================================== --- ../../gcc/testsuite/gfortran.dg/pr79966.f90 (revision 268579) +++ ../../gcc/testsuite/gfortran.dg/pr79966.f90 (working copy) @@ -108,5 +108,5 @@ contains call RunTPTests() end program - -! { dg-final { scan-ipa-dump "Inlined tp_sum/\[0-9\]+ into runtptests/\[0-9\]+" "inline" } } +! See PR88711. Inliner is currently not able to figure out that inlining tp_sum is a good idea. +! { dg-final { scan-ipa-dump "Inlined tp_sum/\[0-9\]+ into runtptests/\[0-9\]+" "inline" { xfail spu-*-* } } }