Commit Graph

7 Commits

Author SHA1 Message Date
Ryan Macnak 2c371ff74e [vm, compiler] Respect --use_slow_path in CheckedSmiOp/Comparison.
TEST=ci
Change-Id: Ib2b1a9b067beb1cbeea2b12355e62a45396697f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192726
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-03-25 17:39:24 +00:00
Aart Bik 40fca03d07 [vm/compiler] fix assert failure on minint64
Rationale:
The new modulo optimization assert fails when doing
the power-of-two-of-abs test on minint64 (since abs
of minint64 is minint64). Note that we could actually
optimize this case by masking with maxint64 pattern
but since it bails for non-smi masks right now, this
fix does the same.

https://github.com/dart-lang/sdk/issues/35815

Change-Id: Ic592dad89ff6ffcd84dba9e17d4bccd79dc01f18
Reviewed-on: https://dart-review.googlesource.com/c/91704
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-01-31 00:55:01 +00:00
Samir Jindel f043f296ef [vm] More modulo tests.
Change-Id: Idded5a07b760a2904edaf72479d13807e9edadfc
Reviewed-on: https://dart-review.googlesource.com/c/89000
Auto-Submit: Samir Jindel <sjindel@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-01-10 21:55:26 +00:00
Samir Jindel 927b0cb9ed [vm/aot] Support optimization of modulo against a power-of-two.
Improves MD5 performance on ARM32 by 15%, from 1.25s to 1.05s.

Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Change-Id: Ia7a0614da662a80db051362fff7a4acacbc2455f
Reviewed-on: https://dart-review.googlesource.com/c/88723
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-01-09 16:26:35 +00:00
Aart Bik fe6daed58b [vm/compiler] "fast"-path for x64 division
Rationale:
Since 64-bit division requires twice as many cycles
and has much higher latency compared to the 32-bit
division, even for a non-speculative 64-bit path,
a 32-bit "fast path" makes sense.

Speedup:
About 2x for cases that fit 32-bits. No noticable
slowdown for the 64-bit cases.

https://github.com/flutter/flutter/issues/19677
https://github.com/dart-lang/sdk/issues/33967

Change-Id: I0d3b44564fee2cda03fc36f089a4424084732de0
Reviewed-on: https://dart-review.googlesource.com/69200
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-08-10 17:48:24 +00:00
Aart Bik 8bad5c7b29 [vm/compiler] Non-speculative X64 long division/remainder.
Rationale:
Having a non-speculative implementation avoids deopting
under JIT and enables AOT.

https://github.com/dart-lang/sdk/issues/33967

Change-Id: Ib38200502f5a8f63912ff5d7a808ea6e27f9001d
Reviewed-on: https://dart-review.googlesource.com/67502
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-08-01 00:13:55 +00:00
Aart Bik 4482d13ff7 [vm/compiler] Bug fix in 64-bit MOD (%) operator.
Rationale:
While writing tests for the ongoing native 64-bit
MOD/TRUNCDIV support in AOT, I noticed a floating-point
crash in our VM due to evaluating the constant mod case:

  Expect.equals(0, mod(minInt64, -1));
  Expect.equals(minInt64, truncdiv(minInt64, -1));

This fixes the constant evaluation part.

https://github.com/dart-lang/sdk/issues/33967

Change-Id: I9a4e6b3cd4d0d0dee39c690d2b981b5812501be4
Reviewed-on: https://dart-review.googlesource.com/67281
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2018-07-28 00:52:42 +00:00