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

Unified Diff: src/compiler/effect-control-linearizer.cc

Issue 2715513007: [compiler] Tune lowering of CheckedUint32ToInt32. (Closed)
Patch Set: Created 3 years, 10 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/effect-control-linearizer.cc
diff --git a/src/compiler/effect-control-linearizer.cc b/src/compiler/effect-control-linearizer.cc
index 6f97a92a98204dba412e75ad3d2441e9fe47dca8..52535a94d26f864459fda7ae853e3350cbafbd40 100644
--- a/src/compiler/effect-control-linearizer.cc
+++ b/src/compiler/effect-control-linearizer.cc
@@ -1482,9 +1482,8 @@ Node* EffectControlLinearizer::LowerCheckedInt32ToTaggedSigned(
Node* EffectControlLinearizer::LowerCheckedUint32ToInt32(Node* node,
Node* frame_state) {
Node* value = node->InputAt(0);
- Node* max_int = __ Int32Constant(std::numeric_limits<int32_t>::max());
- Node* is_safe = __ Uint32LessThanOrEqual(value, max_int);
- __ DeoptimizeUnless(DeoptimizeReason::kLostPrecision, is_safe, frame_state);
+ Node* unsafe = __ Int32LessThan(value, __ Int32Constant(0));
+ __ DeoptimizeIf(DeoptimizeReason::kLostPrecision, unsafe, frame_state);
return value;
}
« 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