Thread overview
[Issue 20162] Sign Extension for ?: optimization done wrong
[Issue 20162] Bug in optimization of remainder operation
Aug 26, 2019
anonymous4
Aug 07, 2020
Walter Bright
Aug 07, 2020
Walter Bright
Aug 07, 2020
Dlang Bot
Aug 09, 2020
Dlang Bot
August 26, 2019
https://issues.dlang.org/show_bug.cgi?id=20162

anonymous4 <dfj1esp02@sneakemail.com> changed:

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

--
August 07, 2020
https://issues.dlang.org/show_bug.cgi?id=20162

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
A smaller test case:

---
import core.stdc.stdio;

long f(long a) {  return a; }

void main() {
  foreach (i; 1 .. 2) {
  foreach (j; 0 .. 2) {
      printf("%d %d %llx\n", i,
        ((i != 0) ? -1 : +1),
        f((i != 0) ? -1 : +1));
  }
  }
}
---

which prints:

1 -1 ffffffff
1 -1 ffffffff

--
August 07, 2020
https://issues.dlang.org/show_bug.cgi?id=20162

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|All                         |x86_64
            Summary|Bug in optimization of      |Sign Extension for ?:
                   |remainder operation         |optimization done wrong

--
August 07, 2020
https://issues.dlang.org/show_bug.cgi?id=20162

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #11529 "fix Issue 20162 - Sign Extension for ?: optimization done wrong" fixing this issue:

- fix Issue 20162 - Sign Extension for ?: optimization done wrong

https://github.com/dlang/dmd/pull/11529

--
August 09, 2020
https://issues.dlang.org/show_bug.cgi?id=20162

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #11529 "fix Issue 20162 - Sign Extension for ?: optimization done wrong" was merged into master:

- a8e77a7de838efa7132179436cce26af047f9ab4 by Walter Bright:
  fix Issue 20162 - Sign Extension for ?: optimization done wrong

https://github.com/dlang/dmd/pull/11529

--