!!!Please add intrinsics module for DMD DRuntime!!!

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 22 09:07:08 PST 2016


On Tuesday, 22 November 2016 at 16:52:40 UTC, Johan Engelen wrote:
> On Tuesday, 22 November 2016 at 16:36:13 UTC, Andrei 
> Alexandrescu wrote:
>> On 11/22/2016 11:28 AM, Ilya Yaroshenko wrote:
>>> They are always software
>>> https://github.com/dlang/druntime/blob/master/src/core/bitop.d --Ilya
>>
>> The intent is to have the compiler detect the pattern and 
>> insert the code. dmd does that IIRC (why is asm.dlang.org not 
>> working again?) and so does gdc: https://godbolt.org/g/WspkIX.
>
> LDC too. https://godbolt.org/g/S83b30
> (note that cross-module inlining is off by default, something 
> to work on for 1.2.0!)

No, LDC and GDC cannot detect it. Proof - 
https://godbolt.org/g/bsAFU8 . Current LDC DRuntime uses 
intrinsics instead of software implementation.

Ilya


More information about the Digitalmars-d mailing list