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

Unified Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 784153006: [x86] Disable invalid checked load/store optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | test/mjsunit/compiler/regress-lena.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
index 95ba8973ea1aa62cac352760b5013d2e7cfbe4d0..a8a9f9d58102dcd92ce69c7490f12218ce44317d 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -230,21 +230,6 @@ void InstructionSelector::VisitCheckedLoad(Node* node) {
UNREACHABLE();
return;
}
- if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) {
- Int32Matcher mlength(length);
- Int32BinopMatcher moffset(offset);
- if (mlength.HasValue() && moffset.right().HasValue() &&
- mlength.Value() > moffset.right().Value()) {
- InstructionOperand* offset_operand = g.UseRegister(moffset.left().node());
- InstructionOperand* length_operand =
- g.TempImmediate(mlength.Value() - moffset.right().Value());
- Emit(opcode | AddressingModeField::encode(kMode_MR1I),
- g.DefineAsRegister(node), offset_operand, length_operand,
- g.UseRegister(buffer), offset_operand,
- g.UseImmediate(moffset.right().node()));
- return;
- }
- }
InstructionOperand* offset_operand = g.UseRegister(offset);
InstructionOperand* length_operand =
g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length);
@@ -284,20 +269,6 @@ void InstructionSelector::VisitCheckedStore(Node* node) {
}
InstructionOperand* value_operand =
g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value);
- if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) {
- Int32Matcher mlength(length);
- Int32BinopMatcher moffset(offset);
- if (mlength.HasValue() && moffset.right().HasValue() &&
- mlength.Value() > moffset.right().Value()) {
- InstructionOperand* offset_operand = g.UseRegister(moffset.left().node());
- InstructionOperand* length_operand =
- g.TempImmediate(mlength.Value() - moffset.right().Value());
- Emit(opcode | AddressingModeField::encode(kMode_MR1I), nullptr,
- offset_operand, length_operand, value_operand, g.UseRegister(buffer),
- offset_operand, g.UseImmediate(moffset.right().node()));
- return;
- }
- }
InstructionOperand* offset_operand = g.UseRegister(offset);
InstructionOperand* length_operand =
g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length);
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | test/mjsunit/compiler/regress-lena.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698