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

Unified Diff: src/compiler/ia32/instruction-selector-ia32.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 | « no previous file | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ia32/instruction-selector-ia32.cc
diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc
index f31cc1f517d6f8c82fda7a80e512ccb50f422f5c..b49b69c60eed72e50b5161e1c5fff6d0f3df952a 100644
--- a/src/compiler/ia32/instruction-selector-ia32.cc
+++ b/src/compiler/ia32/instruction-selector-ia32.cc
@@ -454,29 +454,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()) {
- Int32Matcher mbuffer(buffer);
- InstructionOperand* offset_operand = g.UseRegister(moffset.left().node());
- InstructionOperand* length_operand =
- g.TempImmediate(mlength.Value() - moffset.right().Value());
- if (mbuffer.HasValue()) {
- Emit(opcode | AddressingModeField::encode(kMode_MRI),
- g.DefineAsRegister(node), offset_operand, length_operand,
- offset_operand,
- g.TempImmediate(mbuffer.Value() + moffset.right().Value()));
- } else {
- 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);
@@ -525,28 +502,6 @@ void InstructionSelector::VisitCheckedStore(Node* node) {
? g.UseImmediate(value)
: ((rep == kRepWord8 || rep == kRepBit) ? g.UseByteRegister(value)
: g.UseRegister(value));
- if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) {
- Int32Matcher mbuffer(buffer);
- 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());
- if (mbuffer.HasValue()) {
- Emit(opcode | AddressingModeField::encode(kMode_MRI), nullptr,
- offset_operand, length_operand, value_operand, offset_operand,
- g.TempImmediate(mbuffer.Value() + moffset.right().Value()));
- } else {
- 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 | « no previous file | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698