[PATCH] D24076: [ARM] Use __rt_div functions for DIVREM on Windows

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 02:11:17 PDT 2016


mstorsjo added a comment.

In https://reviews.llvm.org/D24076#541117, @rengolin wrote:

> Just a few more inline comments, and the tests and it should be good.


Actually, it turned out to be harder than this after all. With the current diff, div+rem gets nicely merged into one __rt_sdiv call, but a lone div becomes a __divsi3 instead.

Given all the changes back and forth in this area in the last year (see SVN revisions 248561, 253865, 254158, 263714 or git mirror commits 64ed61ca6b, ee5418798, 937e2d588c, a944db98cd) I'm a bit hesitant to change this further without input from @compnerd. I'll update the patch to a state which works (and doesn't produce calls to __divsi3 or similar), but which doesn't merge the div+rem calls in all cases, and write a bug report for the actual issue that I'm trying to work around (LLVM producing calls to __moddi3 which is unavailable on windows).


https://reviews.llvm.org/D24076





More information about the llvm-commits mailing list