Closed
Bug 2087434
Opened 19 days ago
Closed 18 days ago
[loong64] Test for null or undefined with one tag compare on Loong64
Categories
(Core :: JavaScript Engine: JIT, task)
Tracking
()
RESOLVED
FIXED
161 Branch
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: csmantle, Assigned: csmantle)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
No description provided.
| Assignee | ||
Comment 1•18 days ago
|
||
This saves one branch for each such check, for example in the following
snippet:
function f(x) {
return x ? 1 : 2;
}
for (let i = 0; i < 20000; i++) {
f((i & 1) ? null : 3);
}
Before:
[...]
ld.d $a2, $fp, 40
srai.d $t6, $a2, 0x2f
addi.w $t7, $zero, -12
beq $t6, $t7, 752 -> [...]
bge $zero, $zero, 8 -> [...]
nop
addi.w $t7, $zero, -10
beq $t6, $t7, 736 -> [...]
bge $zero, $zero, 8 -> [...]
nop
[...]
After:
[...]
ld.d $a2, $fp, 40
srai.d $t6, $a2, 0x2f
srai.d $t7, $t6, 0x2
addi.d $t7, $t7, 3
beqz $t7, 736 -> [...]
bge $zero, $zero, 8 -> [...]
nop
[...]
(Note that here $t6 is reused for subsequent tag checks.)
Pushed by iireland@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/2382a4b06f47
https://hg.mozilla.org/integration/autoland/rev/349bde5fb130
[loong64] Test for null or undefined with one tag compare. r=iain
Status: ASSIGNED → RESOLVED
Closed: 18 days ago
status-firefox161:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
Updated•8 days ago
|
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in
before you can comment on or make changes to this bug.
Description
•