[Bug middle-end/54183] Generate __udivmoddi4 instead of __udivdi3 plus __umoddi3

2018-03-19 Thread jimis at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54183 jimis changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug middle-end/54183] Generate __udivmoddi4 instead of __udivdi3 plus __umoddi3

2018-03-17 Thread b7.10110111 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54183 --- Comment #5 from Ruslan --- Yes, this is exactly the problem: the generic case is optimized while the special case, where the divisor is a compile-time constant, isn't.

[Bug middle-end/54183] Generate __udivmoddi4 instead of __udivdi3 plus __umoddi3

2018-03-16 Thread jimis at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54183 --- Comment #4 from jimis --- Indeed, as showcased by this example: https://godbolt.org/g/nsSTHG The function calls __udivmoddi4, like you said. However, the call is inlined in main, but there we see separate calls for __udivdi3 and __umoddi3.

[Bug middle-end/54183] Generate __udivmoddi4 instead of __udivdi3 plus __umoddi3

2018-03-16 Thread b7.10110111 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54183 --- Comment #3 from Ruslan --- Ah, actually your problem is with a constant divisor. I reported it as bug 84759. If you change 10 to e.g. a function parameter, then you'll get __udivmoddi4.

[Bug middle-end/54183] Generate __udivmoddi4 instead of __udivdi3 plus __umoddi3

2018-03-16 Thread jimis at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54183 --- Comment #2 from jimis --- No, I still see the same behaviour with gcc 7.3 on my Fedora box. Is the this link from godbolt showcasing it for you? https://godbolt.org/g/dKEf39

[Bug middle-end/54183] Generate __udivmoddi4 instead of __udivdi3 plus __umoddi3

2018-03-08 Thread b7.10110111 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54183 Ruslan changed: What|Removed |Added CC||b7.10110111 at gmail dot com --- Comment #1