[Bug rtl-optimization/107772] function prologue generated even though it's only needed in an unlikely path

2022-11-28 Thread avi at scylladb dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107772 --- Comment #5 from Avi Kivity --- It indeed generates better code. However, it requires that I duplicate the function body, which can be hard at times (consider f == std::transform and "if (*b != 0) { *b = g(*b); }" as a lambda input.

[Bug rtl-optimization/107772] function prologue generated even though it's only needed in an unlikely path

2022-11-28 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107772 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org --- Com

[Bug rtl-optimization/107772] function prologue generated even though it's only needed in an unlikely path

2022-11-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107772 --- Comment #3 from Andrew Pinski --- (In reply to Avi Kivity from comment #2) > I expect something like this: Right doing shrink wrapping like that is "hard" really and someone would need to add a full infrastructure for this. I doubt it will

[Bug rtl-optimization/107772] function prologue generated even though it's only needed in an unlikely path

2022-11-28 Thread avi at scylladb dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107772 --- Comment #2 from Avi Kivity --- I expect something like this: f(int*, int*): cmp rdi, rsi je .L10 .L4: cmp DWORD PTR [rsi], 0 jne .L14 .L3 add rsi, 4 cmp rsi, rdi

[Bug rtl-optimization/107772] function prologue generated even though it's only needed in an unlikely path

2022-11-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107772 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Severity|normal