mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 15:15:23 +00:00
When merging add nodes, a truncated node and an untraced node should be untruncated (fix oranges, no bug, r=dvander)
This commit is contained in:
parent
f0d9ffca37
commit
e5fca8ca12
@ -829,8 +829,10 @@ MDiv::updateForReplacement(MDefinition *ins_)
|
||||
MDiv *ins = ins_->toDiv();
|
||||
// Since EdgeCaseAnalysis is not being run before GVN, its information does
|
||||
// not need to be merged here.
|
||||
if (isTruncated())
|
||||
if (isTruncated() && ins->isTruncated())
|
||||
setTruncated(Max(isTruncated(), ins->isTruncated()));
|
||||
else
|
||||
setTruncated(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -866,8 +868,10 @@ MAdd::updateForReplacement(MDefinition *ins_)
|
||||
{
|
||||
JS_ASSERT(ins_->isAdd());
|
||||
MAdd *ins = ins_->toAdd();
|
||||
if (isTruncated())
|
||||
if (isTruncated() && ins->isTruncated())
|
||||
setTruncated(Max(isTruncated(), ins->isTruncated()));
|
||||
else
|
||||
setTruncated(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -896,8 +900,10 @@ MSub::updateForReplacement(MDefinition *ins_)
|
||||
{
|
||||
JS_ASSERT(ins_->isSub());
|
||||
MSub *ins = ins_->toSub();
|
||||
if (isTruncated())
|
||||
if (isTruncated() && ins->isTruncated())
|
||||
setTruncated(Max(isTruncated(), ins->isTruncated()));
|
||||
else
|
||||
setTruncated(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2595,7 +2595,7 @@ class MSub : public MBinaryArithInstruction
|
||||
int implicitTruncate_;
|
||||
MSub(MDefinition *left, MDefinition *right)
|
||||
: MBinaryArithInstruction(left, right),
|
||||
implicitTruncate_(false)
|
||||
implicitTruncate_(0)
|
||||
{
|
||||
setResultType(MIRType_Value);
|
||||
}
|
||||
@ -2732,7 +2732,7 @@ class MDiv : public MBinaryArithInstruction
|
||||
canBeNegativeZero_(true),
|
||||
canBeNegativeOverflow_(true),
|
||||
canBeDivideByZero_(true),
|
||||
implicitTruncate_(false)
|
||||
implicitTruncate_(0)
|
||||
{
|
||||
if (type != MIRType_Value)
|
||||
specialization_ = type;
|
||||
|
Loading…
Reference in New Issue
Block a user