| Index: src/compiler/simplified-lowering.cc
|
| diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
|
| index 8595ee63bce5f6c578839835e447e60e7ebb7123..ff48d34ef80ba182da5aa4c4d66b518114275f37 100644
|
| --- a/src/compiler/simplified-lowering.cc
|
| +++ b/src/compiler/simplified-lowering.cc
|
| @@ -510,6 +510,10 @@ class RepresentationSelector {
|
| return (use & (kTypeUint32 | kTypeNumber | kTypeAny)) != 0;
|
| }
|
|
|
| + bool CanObserveNaN(MachineTypeUnion use) {
|
| + return (use & (kTypeNumber | kTypeAny)) != 0;
|
| + }
|
| +
|
| bool CanObserveNonUint32(MachineTypeUnion use) {
|
| return (use & (kTypeInt32 | kTypeNumber | kTypeAny)) != 0;
|
| }
|
| @@ -707,7 +711,7 @@ class RepresentationSelector {
|
| if (lower()) DeferReplacement(node, lowering->Int32Mod(node));
|
| break;
|
| }
|
| - if (CanLowerToUint32Binop(node, use)) {
|
| + if (BothInputsAre(node, Type::Unsigned32()) && !CanObserveNaN(use)) {
|
| // => unsigned Uint32Mod
|
| VisitUint32Binop(node);
|
| if (lower()) DeferReplacement(node, lowering->Uint32Mod(node));
|
|
|