mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1062612 - IonMonkey: Fix cast insertion for truncation of phi operands r=nbp
This commit is contained in:
parent
9a81e7b11f
commit
94927c5089
7
js/src/jit-test/tests/ion/bug1062612.js
Normal file
7
js/src/jit-test/tests/ion/bug1062612.js
Normal file
@ -0,0 +1,7 @@
|
||||
x = [0, 1, 1, 0, 1, 1];
|
||||
y = -1;
|
||||
sum = 0;
|
||||
for (var j = 0; j < x.length; ++j) {
|
||||
sum = sum + (x[j] ? 0 : (y >>> 0)) | 0;
|
||||
}
|
||||
assertEq(sum, -2);
|
@ -2582,7 +2582,7 @@ AdjustTruncatedInputs(TempAllocator &alloc, MDefinition *truncated)
|
||||
op = MTruncateToInt32::New(alloc, truncated->getOperand(i));
|
||||
|
||||
if (truncated->isPhi()) {
|
||||
MBasicBlock *pred = op->block()->getPredecessor(i);
|
||||
MBasicBlock *pred = block->getPredecessor(i);
|
||||
pred->insertBefore(pred->lastIns(), op);
|
||||
} else {
|
||||
block->insertBefore(truncated->toInstruction(), op);
|
||||
|
Loading…
Reference in New Issue
Block a user