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

Side by Side Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 2427483002: [turbofan][X64] Movzxbl/Movsxbl/Movzxwl/Movsxwl also zero extend to 64bit. (Closed)
Patch Set: update the CL according to titzer/bmeurer's comments Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/unittests/compiler/x64/instruction-selector-x64-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 Node* const value = node->InputAt(0); 1243 Node* const value = node->InputAt(0);
1244 switch (value->opcode()) { 1244 switch (value->opcode()) {
1245 case IrOpcode::kInt32AddWithOverflow: 1245 case IrOpcode::kInt32AddWithOverflow:
1246 case IrOpcode::kInt32SubWithOverflow: 1246 case IrOpcode::kInt32SubWithOverflow:
1247 case IrOpcode::kInt32MulWithOverflow: 1247 case IrOpcode::kInt32MulWithOverflow:
1248 return true; 1248 return true;
1249 default: 1249 default:
1250 return false; 1250 return false;
1251 } 1251 }
1252 } 1252 }
1253 case IrOpcode::kLoad: {
1254 // The movzxbl/movsxbl/movzxwl/movsxwl operations implicitly zero-extend
1255 // to 64-bit on x64,
1256 // so the zero-extension is a no-op.
1257 LoadRepresentation load_rep = LoadRepresentationOf(node->op());
1258 switch (load_rep.representation()) {
1259 case MachineRepresentation::kWord8:
1260 case MachineRepresentation::kWord16:
1261 return true;
1262 default:
1263 return false;
1264 }
1265 }
1253 default: 1266 default:
1254 return false; 1267 return false;
1255 } 1268 }
1256 } 1269 }
1257 1270
1258 } // namespace 1271 } // namespace
1259 1272
1260 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { 1273 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) {
1261 X64OperandGenerator g(this); 1274 X64OperandGenerator g(this);
1262 Node* value = node->InputAt(0); 1275 Node* value = node->InputAt(0);
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
2333 // static 2346 // static
2334 MachineOperatorBuilder::AlignmentRequirements 2347 MachineOperatorBuilder::AlignmentRequirements
2335 InstructionSelector::AlignmentRequirements() { 2348 InstructionSelector::AlignmentRequirements() {
2336 return MachineOperatorBuilder::AlignmentRequirements:: 2349 return MachineOperatorBuilder::AlignmentRequirements::
2337 FullUnalignedAccessSupport(); 2350 FullUnalignedAccessSupport();
2338 } 2351 }
2339 2352
2340 } // namespace compiler 2353 } // namespace compiler
2341 } // namespace internal 2354 } // namespace internal
2342 } // namespace v8 2355 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/unittests/compiler/x64/instruction-selector-x64-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698