Reviewers: Toon Verwaest,

Message:
It seems that we could remove this as the HShr's representation is Integer32, if the result's representation is SMI, we will insert a HChange instruction. The lithium will lower the HChange to SmiTag. SmiTag is able to handle the overflow
and deoptimization.

Description:
Remove unnecessary HCompareNumericAndBranch when generating HShr instruction.

Please review this at https://codereview.chromium.org/334573003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+0, -14 lines):
  M src/code-stubs-hydrogen.cc


Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 1755405684bd19c63e250e0708e6cf184077f1cf..8342f9f7ea1d7c64a5fc3ad7f395dd6dd7f0c215 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -920,20 +920,6 @@ HValue* CodeStubGraphBuilder<BinaryOpICStub>::BuildCodeInitializedStub() {
   // If we encounter a generic argument, the number conversion is
   // observable, thus we cannot afford to bail out after the fact.
   if (!state.HasSideEffects()) {
-    if (result_type->Is(Type::SignedSmall())) {
-      if (state.op() == Token::SHR) {
-        // TODO(olivf) Replace this by a SmiTagU Instruction.
- // 0x40000000: this number would convert to negative when interpreting
-        // the register as signed value;
-        IfBuilder if_of(this);
-        if_of.IfNot<HCompareNumericAndBranch>(result,
-            Add<HConstant>(static_cast<int>(SmiValuesAre32Bits()
-                ? 0x80000000 : 0x40000000)), Token::EQ_STRICT);
-        if_of.Then();
-        if_of.ElseDeopt("UInt->Smi oveflow");
-        if_of.End();
-      }
-    }
     result = EnforceNumberType(result, result_type);
   }



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to