[Issue 19584] Illegal optimization: Shift-or -> imul

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 20 06:16:43 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19584

Suleyman Sahmi (سليمان السهمي) <sahmi.soulaimane at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sahmi.soulaimane at gmail.com

--- Comment #3 from Suleyman Sahmi (سليمان السهمي) <sahmi.soulaimane at gmail.com> ---
Reduced to:

```
void main()
{
    int a = 711;
    assert(182215 == (a | (a << 8)));
    assert(182727 == (a * (1 + (1 << 8))));

    int b = 31;
    assert(511 == (b | (b << 4)));
    assert(527 == (b * (1 + (1 << 4))));
}
```

https://run.dlang.io/is/MjL0NG

--


More information about the Digitalmars-d-bugs mailing list