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

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: 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 58c0bf02a4082188df13d40d47320eac9c417418..f9c2a6d67cc57c2cf10cff43375905c9deca736e 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 (BothInputsAreUnsigned32(node)) {
Jarin 2016/07/11 12:31:58 Is not it sufficient to check that the first input
Benedikt Meurer 2016/07/11 12:52:00 Done, thanks.
+ 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