Bitwise rotate of integral

Patrick Schluter Patrick.Schluter at
Tue Jan 8 13:33:01 UTC 2019

On Tuesday, 8 January 2019 at 12:35:16 UTC, H. S. Teoh wrote:
> On Tue, Jan 08, 2019 at 09:15:09AM +0000, Patrick Schluter via 
> Digitalmars-d-learn wrote:
>> On Monday, 7 January 2019 at 23:20:57 UTC, H. S. Teoh wrote:
> [...]
>> > [...]
>> Are you sure it's dmd looking for the pattern. Playing with 
>> the godbolt link shows that dmd doesn't generate the rol code 
>> (gdc 4.8.2 neither).
> I vaguely remember a bug about this. There is definitely 
> explicit checking for this in dmd; I don't remember if it was a 
> bug in the pattern matching code itself, or some other problem, 
> that made it fail. You may need to specify -O for the code to 
> actually be active. Walter could point you to the actual 
> function that does this optimization.
I did use the -O flag. The code generated did not use rol.

More information about the Digitalmars-d-learn mailing list