Index: src/compiler/simplified-lowering.cc |
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc |
index fdecfc0ab46b86bffe82905ad80c93b9cb8aab8a..1bf1e4fb3ebbf3916370c596eab327cc6a6839fc 100644 |
--- a/src/compiler/simplified-lowering.cc |
+++ b/src/compiler/simplified-lowering.cc |
@@ -1810,8 +1810,14 @@ class RepresentationSelector { |
} |
case IrOpcode::kCheckBounds: { |
- VisitBinop(node, UseInfo::CheckedSigned32AsWord32(), |
- UseInfo::TruncatingWord32(), MachineRepresentation::kWord32); |
+ if (TypeOf(node->InputAt(0))->Is(Type::Unsigned32())) { |
+ VisitBinop(node, UseInfo::TruncatingWord32(), |
+ MachineRepresentation::kWord32); |
+ } else { |
+ VisitBinop(node, UseInfo::CheckedSigned32AsWord32(), |
+ UseInfo::TruncatingWord32(), |
+ MachineRepresentation::kWord32); |
+ } |
return; |
} |
case IrOpcode::kCheckIf: { |