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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 21196006: Don't generate a shift left by one if can deoptimize on ia32 and arm and mips. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 __ And(at, left, Operand(0x80000000)); 1576 __ And(at, left, Operand(0x80000000));
1577 DeoptimizeIf(ne, instr->environment(), at, Operand(zero_reg)); 1577 DeoptimizeIf(ne, instr->environment(), at, Operand(zero_reg));
1578 } 1578 }
1579 __ Move(result, left); 1579 __ Move(result, left);
1580 } 1580 }
1581 break; 1581 break;
1582 case Token::SHL: 1582 case Token::SHL:
1583 if (shift_count != 0) { 1583 if (shift_count != 0) {
1584 if (instr->hydrogen_value()->representation().IsSmi() && 1584 if (instr->hydrogen_value()->representation().IsSmi() &&
1585 instr->can_deopt()) { 1585 instr->can_deopt()) {
1586 __ sll(result, left, shift_count - 1); 1586 if (shift_count != 1) {
1587 __ sll(result, left, shift_count - 1);
1588 }
1587 __ SmiTagCheckOverflow(result, result, scratch); 1589 __ SmiTagCheckOverflow(result, result, scratch);
1588 DeoptimizeIf(lt, instr->environment(), scratch, Operand(zero_reg)); 1590 DeoptimizeIf(lt, instr->environment(), scratch, Operand(zero_reg));
1589 } else { 1591 } else {
1590 __ sll(result, left, shift_count); 1592 __ sll(result, left, shift_count);
1591 } 1593 }
1592 } else { 1594 } else {
1593 __ Move(result, left); 1595 __ Move(result, left);
1594 } 1596 }
1595 break; 1597 break;
1596 default: 1598 default:
(...skipping 4257 matching lines...) Expand 10 before | Expand all | Expand 10 after
5854 __ Subu(scratch, result, scratch); 5856 __ Subu(scratch, result, scratch);
5855 __ lw(result, FieldMemOperand(scratch, 5857 __ lw(result, FieldMemOperand(scratch,
5856 FixedArray::kHeaderSize - kPointerSize)); 5858 FixedArray::kHeaderSize - kPointerSize));
5857 __ bind(&done); 5859 __ bind(&done);
5858 } 5860 }
5859 5861
5860 5862
5861 #undef __ 5863 #undef __
5862 5864
5863 } } // namespace v8::internal 5865 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698