Fix cornercase in r19475

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/169353003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 13d99fe7
...@@ -216,7 +216,11 @@ class BoundsCheckBbData: public ZoneObject { ...@@ -216,7 +216,11 @@ class BoundsCheckBbData: public ZoneObject {
void MoveIndexIfNecessary(HValue* index_raw, void MoveIndexIfNecessary(HValue* index_raw,
HBoundsCheck* insert_before, HBoundsCheck* insert_before,
HInstruction* end_of_scan_range) { HInstruction* end_of_scan_range) {
ASSERT(index_raw->IsAdd() || index_raw->IsSub()); if (!index_raw->IsAdd() && !index_raw->IsSub()) {
// index_raw can be HAdd(index_base, offset), HSub(index_base, offset),
// or index_base directly. In the latter case, no need to move anything.
return;
}
HArithmeticBinaryOperation* index = HArithmeticBinaryOperation* index =
HArithmeticBinaryOperation::cast(index_raw); HArithmeticBinaryOperation::cast(index_raw);
HValue* left_input = index->left(); HValue* left_input = index->left();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment