mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07: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
d150d2964c
commit
18452c67d0
@ -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