Thread overview
[Issue 13383] wrong code with -O with ints, longs and bitwise operations
Aug 29, 2014
Ivan Kazmenko
Aug 29, 2014
Ivan Kazmenko
Aug 31, 2014
yebblies
August 29, 2014
https://issues.dlang.org/show_bug.cgi?id=13383

--- Comment #1 from Ivan Kazmenko <gassa@mail.ru> ---
Created attachment 1390
  --> https://issues.dlang.org/attachment.cgi?id=1390&action=edit
A small example demonstrating the problem.

--
August 29, 2014
https://issues.dlang.org/show_bug.cgi?id=13383

Ivan Kazmenko <gassa@mail.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--
August 31, 2014
https://issues.dlang.org/show_bug.cgi?id=13383

yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |yebblies@gmail.com
           Assignee|nobody@puremagic.com        |yebblies@gmail.com
                 OS|Windows                     |All

--- Comment #2 from yebblies <yebblies@gmail.com> ---
The compiler incorrectly optimizes 1L & (1L << k) to 1 btst k, which is only valid when 1L fits in a register.

https://github.com/D-Programming-Language/dmd/pull/3934

--
September 02, 2014
https://issues.dlang.org/show_bug.cgi?id=13383

--- Comment #3 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e14242906651c07247e41e37de1d27a18b81e54b Fix Issue 13383 - wrong code with -O with ints, longs and bitwise operations

Converting '(1 << a) & b' to 'b btst a' is only valid when the constant fits in
a register.

https://github.com/D-Programming-Language/dmd/commit/10edd8d6121ffffd916bc94768723b15c6a321c1 Merge pull request #3934 from yebblies/issue13383

Issue 13383 - wrong code with -O with ints, longs and bitwise operations

--
September 04, 2014
https://issues.dlang.org/show_bug.cgi?id=13383

--- Comment #4 from github-bugzilla@puremagic.com ---
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d1a3b4e624971de83456d1b1e2a84dc480e54e94 Merge pull request #3934 from yebblies/issue13383

Issue 13383 - wrong code with -O with ints, longs and bitwise operations

--