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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 25809002: Forward stores to loads for SIMD arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | tests/lib/typed_data/simd_store_to_load_forward_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index f2d9c90464324fabb0e08c2ee7d3ab8abcefd9f5..ff0df45ce9a4ce15762e939ff9fcf187560cffab 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -4939,13 +4939,14 @@ class LoadOptimizer : public ValueObject {
gen->RemoveAll(killed);
}
- // Only forward stores to normal arrays and float64 arrays
+ // Only forward stores to normal arrays, float64, and simd arrays
// to loads because other array stores (intXX/uintXX/float32)
// may implicitly convert the value stored.
StoreIndexedInstr* array_store = instr->AsStoreIndexed();
- if (array_store == NULL ||
- array_store->class_id() == kArrayCid ||
- array_store->class_id() == kTypedDataFloat64ArrayCid) {
+ if ((array_store == NULL) ||
+ (array_store->class_id() == kArrayCid) ||
+ (array_store->class_id() == kTypedDataFloat64ArrayCid) ||
+ (array_store->class_id() == kTypedDataFloat32x4ArrayCid)) {
bool is_load = false;
Place store_place(instr, &is_load);
ASSERT(!is_load);
« no previous file with comments | « no previous file | tests/lib/typed_data/simd_store_to_load_forward_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698