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

Unified Diff: src/compiler/machine-operator-reducer.cc

Issue 1779713009: Implement optional turbofan UnalignedLoad and UnalignedStore operators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unaligned access simulate using load/shift/or and store/shift/and Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/machine-operator-reducer.cc
diff --git a/src/compiler/machine-operator-reducer.cc b/src/compiler/machine-operator-reducer.cc
index 19ea06205361fef01f29d5a2dc22e6067de10554..3ff3b5661984f90c0f6dc77e09ab0644cbfb6d4b 100644
--- a/src/compiler/machine-operator-reducer.cc
+++ b/src/compiler/machine-operator-reducer.cc
@@ -438,6 +438,7 @@ Reduction MachineOperatorReducer::Reduce(Node* node) {
case IrOpcode::kFloat64InsertHighWord32:
return ReduceFloat64InsertHighWord32(node);
case IrOpcode::kStore:
+ case IrOpcode::kUnalignedStore:
return ReduceStore(node);
case IrOpcode::kFloat64Equal:
case IrOpcode::kFloat64LessThan:
@@ -677,9 +678,21 @@ Reduction MachineOperatorReducer::ReduceTruncateFloat64ToInt32(Node* node) {
Reduction MachineOperatorReducer::ReduceStore(Node* node) {
- MachineRepresentation const rep =
- StoreRepresentationOf(node->op()).representation();
+ MachineRepresentation rep;
Node* const value = node->InputAt(2);
+
+ switch (node->opcode()) {
+ case IrOpcode::kStore:
+ rep = StoreRepresentationOf(node->op()).representation();
+ break;
+ case IrOpcode::kUnalignedStore:
+ rep = UnalignedStoreRepresentationOf(node->op());
+ break;
+ default:
+ UNREACHABLE();
+ break;
+ }
+
switch (value->opcode()) {
case IrOpcode::kWord32And: {
Uint32BinopMatcher m(value);

Powered by Google App Engine
This is Rietveld 408576698