Hi,
On 10/18/25 22:50, Andrew Pinski wrote:
This will fully fixhttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=80161 I think.
Currently with x86_64 specific testcase in comment #0 and removing the
const for scale (so it is not done in the front-end), only `-O2 -flto`
works. From my understanding this patch series is designed to remove
the requirement of `-flto`, if so then please add the testcase (if it
works) and add `PR ipa/80161` to the changelog entry on when it gets
fix.
Yes, the series is designed to remove the -flto requirement for even
getting the propagation started. As it is in master right now, the
edges won't be created without -flto, so no propagation happens. With
the patch series, the testcase works in spirit, but not in practice.
The value does get propagated and a clone is created, but the original
kernel is left in the program, so the problem persists. If you add:
```
if (!__builtin_constant_p (scale))
___builtin_abort ();
```
into the loop, it compiles just fine, because the problematic call is
optimized away. It works with LTO as well, because the original kernel
gets removed. Declaring the function as static also does the trick.
Looks likehttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=49575 too.
Yes, this is solved.
Also Good work on this, it has definitely been a long time coming and
very much welcome improvement to GCC.
Thank you, I am trying my best. :)
Thanks,
Andrew
Best regards,
Josef