int __attribute__((noipa)) dummy (real_t sum) {
return 0;
}
real_t s311(struct args_t * func_args)
{
real_t sum = (real_t)0.;
for (int i = 0; i < LEN_1D; i++) {
sum += a[i];
}
dummy (sum);
return 0.0;
}
The callee function dummy has a attribute((noipa)), the gcc will prevent the inline, and clang inline it, so they have different behaviors, which one is right ?
I don’t think Clang supports noipa (there’s a warning about it too) so that’s probably what you’re seeing.
Clang does have the noinline attribute, though other optimizations are still allowed which can make the end result look like an inlining event happened. So be careful interpreting the results of that one.