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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/arm/lithium-codegen-arm.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | 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 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 __ test(ToRegister(left), Immediate(0x80000000)); 1764 __ test(ToRegister(left), Immediate(0x80000000));
1765 DeoptimizeIf(not_zero, instr->environment()); 1765 DeoptimizeIf(not_zero, instr->environment());
1766 } else { 1766 } else {
1767 __ shr(ToRegister(left), shift_count); 1767 __ shr(ToRegister(left), shift_count);
1768 } 1768 }
1769 break; 1769 break;
1770 case Token::SHL: 1770 case Token::SHL:
1771 if (shift_count != 0) { 1771 if (shift_count != 0) {
1772 if (instr->hydrogen_value()->representation().IsSmi() && 1772 if (instr->hydrogen_value()->representation().IsSmi() &&
1773 instr->can_deopt()) { 1773 instr->can_deopt()) {
1774 __ shl(ToRegister(left), shift_count - 1); 1774 if (shift_count != 1) {
1775 __ shl(ToRegister(left), shift_count - 1);
1776 }
1775 __ SmiTag(ToRegister(left)); 1777 __ SmiTag(ToRegister(left));
1776 DeoptimizeIf(overflow, instr->environment()); 1778 DeoptimizeIf(overflow, instr->environment());
1777 } else { 1779 } else {
1778 __ shl(ToRegister(left), shift_count); 1780 __ shl(ToRegister(left), shift_count);
1779 } 1781 }
1780 } 1782 }
1781 break; 1783 break;
1782 default: 1784 default:
1783 UNREACHABLE(); 1785 UNREACHABLE();
1784 break; 1786 break;
(...skipping 4738 matching lines...) Expand 10 before | Expand all | Expand 10 after
6523 FixedArray::kHeaderSize - kPointerSize)); 6525 FixedArray::kHeaderSize - kPointerSize));
6524 __ bind(&done); 6526 __ bind(&done);
6525 } 6527 }
6526 6528
6527 6529
6528 #undef __ 6530 #undef __
6529 6531
6530 } } // namespace v8::internal 6532 } } // namespace v8::internal
6531 6533
6532 #endif // V8_TARGET_ARCH_IA32 6534 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698