Improve branchTruncateDoubleToInt32 test coverage and remove some dead code
Categories
(Core :: JavaScript Engine: JIT, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
Details
Attachments
(3 files)
The LoongArch maintainers noticed we're missing test coverage for the out-of-int32-range case. I wrote a test that failed for them but jit-tests didn't catch it with --tbpl
:
function g(d) {
return parseInt(d);
}
function f() {
with({}) {}
for (var i = 0; i < 10_000; i++) {
assertEq(g(1.1), 1);
}
assertEq(g(0xf_ffff_ffff) + 345, 68719477080);
}
f();
I also noticed some of the callers are dead code and/or can be simplified now post-Warp.
Assignee | ||
Comment 1•1 year ago
|
||
MToIntegerInt32
is currently only used for boolean-to-int32. We can do that with
a much simpler MIR instruction.
Assignee | ||
Comment 2•1 year ago
|
||
Depends on D169896
Assignee | ||
Comment 3•1 year ago
|
||
The LoongArch maintainers noticed we were missing test coverage for some of these cases.
This test catches the bug they had noticed in their implementation, so we should add it
to the test suite.
Depends on D169897
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/13cee6282674 part 1 - Replace MToIntegerInt32 with MBooleanToInt32. r=iain,nbp https://hg.mozilla.org/integration/autoland/rev/91f90c6bfe46 part 2 - Remove dead truncate-no-wrap code. r=iain https://hg.mozilla.org/integration/autoland/rev/f76abe74fdee part 3 - Add test for truncating large doubles to int32. r=iain
Comment 5•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/13cee6282674
https://hg.mozilla.org/mozilla-central/rev/91f90c6bfe46
https://hg.mozilla.org/mozilla-central/rev/f76abe74fdee
Description
•