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

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

Issue 2916093002: [ia32][wasm] Support AVX instructions for I32x4Splat/ReplaceLane/ExtractLane (Closed)
Patch Set: Created 3 years, 7 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 | « src/compiler/ia32/instruction-scheduler-ia32.cc ('k') | src/ia32/assembler-ia32.h » ('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 dccfced9e1da2596d7cede9bcfae121f3deae243..1c48a7cd66d26a054744e36ad5a9767ff35d28fa 100644
--- a/src/compiler/ia32/instruction-selector-ia32.cc
+++ b/src/compiler/ia32/instruction-selector-ia32.cc
@@ -1918,10 +1918,16 @@ void InstructionSelector::VisitI32x4ExtractLane(Node* node) {
void InstructionSelector::VisitI32x4ReplaceLane(Node* node) {
IA32OperandGenerator g(this);
- int32_t lane = OpParameter<int32_t>(node);
- Emit(kIA32I32x4ReplaceLane, g.DefineSameAsFirst(node),
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane),
- g.Use(node->InputAt(1)));
+ InstructionOperand operand0 = g.UseRegister(node->InputAt(0));
+ InstructionOperand operand1 = g.UseImmediate(OpParameter<int32_t>(node));
+ InstructionOperand operand2 = g.Use(node->InputAt(1));
+ if (IsSupported(AVX)) {
+ Emit(kAVXI32x4ReplaceLane, g.DefineAsRegister(node), operand0, operand1,
+ operand2);
+ } else {
+ Emit(kSSEI32x4ReplaceLane, g.DefineSameAsFirst(node), operand0, operand1,
+ operand2);
+ }
}
void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) {
« no previous file with comments | « src/compiler/ia32/instruction-scheduler-ia32.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698