Issue with Clang on Windows and compiler-rt builtins

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue with Clang on Windows and compiler-rt builtins

Matthieu Brucher via cfe-dev
>> When __int128 operations are used, Clang on Windows generate calls to
>> compiler-rt builtins (__udivti3 etc.) instead of generating inline
>> optimized assembly directly.
>
> LLVM does not inline division or modulo for 128bit operands. Way too
> much code.

Thanks for the pointer.

After checking with https://godbolt.org/g/HN7wf5 , I realized my mistake. GCC
and Clang on Linux will constant fold __int128 if possible, otherwise __udivti3
etc. function calls will still be emitted.

I submitted a patch to compiler-rt for this at https://reviews.llvm.org/D41813.
Hope I am doing it correctly.

Rong Jie
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev