[Bug c/93002] New: while(i--) optimization

2019-12-18 Thread getchar_gnu at hotmail dot com
: unassigned at gcc dot gnu.org Reporter: getchar_gnu at hotmail dot com Target Milestone: --- while (i--) can be compiled into `sub ecx, 1 / jnc code` rather than `dec ecx / cmp ecx, -1 / jne code`. See https://stackoverflow.com/questions/54278070/ for discussion (I'm asker)

[Bug target/93002] while(i--) optimization

2019-12-19 Thread getchar_gnu at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93002 --- Comment #7 from getchar_gnu at hotmail dot com --- Actually for `while (i--) sink=i;` with knowledge that `i!=0` it's valid to compile as .L11: subl$1, %edi movl%edi, sink(%rip) jne .L11

[Bug c++/90782] New: internal compiler error: in dependent_type_p, at cp/pt.c:25409

2019-06-07 Thread getchar_gnu at hotmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: getchar_gnu at hotmail dot com Target Milestone: --- https://gcc.godbolt.org/z/rM-dZg -std=c++17 -m64 template struct bar { template bar(B& obj, R(B::*f)(A...)const=B::oper

[Bug c++/90782] internal compiler error: in dependent_type_p, at cp/pt.c:25409

2020-12-15 Thread getchar_gnu at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90782 --- Comment #6 from getchar_gnu at hotmail dot com --- https://gcc.godbolt.org/z/qzG9jj template struct bar { template bar(B& obj, void(B::*f)(A...)const=&B::operator()){} }; int main() { const auto f1 = [](){}; b

[Bug c/103614] New: Modulo equality optimization

2021-12-07 Thread getchar_gnu at hotmail dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: getchar_gnu at hotmail dot com Target Milestone: --- Code: https://gcc.godbolt.org/z/99s5fc695 Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853 (signed)x%145==0, (unsigned)x%145==0, (unsigned)x%145==1 are all optimized into form

[Bug middle-end/103614] Modulo equality optimization

2021-12-10 Thread getchar_gnu at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103614 --- Comment #1 from getchar_gnu at hotmail dot com --- Not sure if related, but something like x%13==8 && x>17 && x<146 can also reduce some code