Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM: Optimized Float32x4 division on SIMARM broken #26675

Closed
fsc8000 opened this issue Jun 9, 2016 · 0 comments
Closed

VM: Optimized Float32x4 division on SIMARM broken #26675

fsc8000 opened this issue Jun 9, 2016 · 0 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@fsc8000
Copy link
Contributor

fsc8000 commented Jun 9, 2016

import "dart:typed_data";

div(a, b) => a / b;

main() {
  var op1 = new Float32x4(1.0, 0.0, -1.0, 1.0);
  var op2 = new Float32x4(0.0, 0.0, 0.0, -0.0);
  var res;
  for (var i=0; i<100000; ++i) {
    res = div(op1, op2);
  }
  print(res);
}

prints
[-nan, -nan, -nan, -nan]

without optimizations (--optimization-counter-threshold=-1) prints

[inf, -nan, -inf, -inf]

@fsc8000 fsc8000 added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Jun 9, 2016
@zanderso zanderso added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Nov 6, 2016
@johnmccutchan johnmccutchan removed their assignment Apr 11, 2017
dart-bot pushed a commit that referenced this issue Mar 9, 2018
This reverts commit 3da9c34.

Reason for revert: Broke the build on vm-kernel-precomp-linux-release-simarm

Original change's description:
> [vm/simarm] Fix VRECPS/VRSQRTSQS instruction implementation.
> 
> This instruction handles 0.0 and infinity operands
> specially because otherwise it produces NaN where it
> should produce appropriate infinity or zero.
> 
> Fixes #24399
> Fixes #26675
> 
> Change-Id: I0741d0daa8b92b4dcd780b1453c9ec449552b1fd
> Reviewed-on: https://dart-review.googlesource.com/45382
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=whesse@google.com,vegorov@google.com,alexmarkov@google.com,zra@google.com

Change-Id: I413be56fdce8afa0e2faa6ed2b16ef0f68b795b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/45683
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
dart-bot pushed a commit that referenced this issue Oct 15, 2019
This instruction handles 0.0 and infinity operands
specially because otherwise it produces NaN where it
should produce appropriate infinity or zero.

Fixes #24399
Fixes #26675
Fixes #38844

This relands commit 3da9c34

Change-Id: I116cea3b6c27b5dc16741f9652fbbb9a3ec1194e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121705
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
tekknolagi pushed a commit to tekknolagi/dart-assembler that referenced this issue Nov 3, 2020
This instruction handles 0.0 and infinity operands
specially because otherwise it produces NaN where it
should produce appropriate infinity or zero.

Fixes dart-lang#24399
Fixes dart-lang#26675

Change-Id: I0741d0daa8b92b4dcd780b1453c9ec449552b1fd
Reviewed-on: https://dart-review.googlesource.com/45382
Reviewed-by: Zach Anderson <zra@google.com>
tekknolagi pushed a commit to tekknolagi/dart-assembler that referenced this issue Nov 3, 2020
This reverts commit 3da9c34.

Reason for revert: Broke the build on vm-kernel-precomp-linux-release-simarm

Original change's description:
> [vm/simarm] Fix VRECPS/VRSQRTSQS instruction implementation.
> 
> This instruction handles 0.0 and infinity operands
> specially because otherwise it produces NaN where it
> should produce appropriate infinity or zero.
> 
> Fixes dart-lang#24399
> Fixes dart-lang#26675
> 
> Change-Id: I0741d0daa8b92b4dcd780b1453c9ec449552b1fd
> Reviewed-on: https://dart-review.googlesource.com/45382
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=whesse@google.com,vegorov@google.com,alexmarkov@google.com,zra@google.com

Change-Id: I413be56fdce8afa0e2faa6ed2b16ef0f68b795b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/45683
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
tekknolagi pushed a commit to tekknolagi/dart-assembler that referenced this issue Nov 3, 2020
This instruction handles 0.0 and infinity operands
specially because otherwise it produces NaN where it
should produce appropriate infinity or zero.

Fixes dart-lang#24399
Fixes dart-lang#26675
Fixes dart-lang#38844

This relands commit 3da9c34

Change-Id: I116cea3b6c27b5dc16741f9652fbbb9a3ec1194e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121705
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants