Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Unified Diff: src/compiler/simplified-lowering.cc

Issue 2138753002: [turbofan] CheckBounds with Unsigned32 inputs is also supported. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@TurboFan_SimplifiedLowering
Patch Set: Address comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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: {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698