Commit e60e9611 authored by gdeepti's avatar gdeepti Committed by Commit bot

[simd] Disable Simd Scalar lowering for x64, enable tests for all other architectures.

 - Simd Scalar lowering should be conditionally disabled if the architecture has a native SIMD implementation.
 - Enable scalar lowering tests on all architectures instead of only x64.

R=bbudge@chromium.org, aseemgarg@chromium.org

Review-Url: https://codereview.chromium.org/2514663002
Cr-Commit-Position: refs/heads/master@{#41160}
parent 71144e5a
......@@ -3348,8 +3348,10 @@ SourcePositionTable* WasmCompilationUnit::BuildGraphForWasmFunction(
r.LowerGraph();
}
SimdScalarLowering(graph, machine, common, jsgraph_->zone(), function_->sig)
.LowerGraph();
if (!CpuFeatures::SupportsSimd128()) {
SimdScalarLowering(graph, machine, common, jsgraph_->zone(), function_->sig)
.LowerGraph();
}
int index = static_cast<int>(function_->func_index);
......
......@@ -16,7 +16,7 @@ namespace internal {
bool CpuFeatures::SupportsCrankshaft() { return true; }
bool CpuFeatures::SupportsSimd128() { return false; }
bool CpuFeatures::SupportsSimd128() { return true; }
// -----------------------------------------------------------------------------
// Implementation of Assembler
......
......@@ -206,6 +206,7 @@ v8_executable("cctest") {
"test-disasm-arm.cc",
"test-macro-assembler-arm.cc",
"test-run-wasm-relocation-arm.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "arm64") {
sources += [ ### gcmole(arch:arm64) ###
......@@ -220,6 +221,7 @@ v8_executable("cctest") {
"test-run-wasm-relocation-arm64.cc",
"test-utils-arm64.cc",
"test-utils-arm64.h",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "x86") {
sources += [ ### gcmole(arch:ia32) ###
......@@ -231,6 +233,7 @@ v8_executable("cctest") {
"test-log-stack-tracer.cc",
"test-macro-assembler-ia32.cc",
"test-run-wasm-relocation-ia32.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "mips") {
sources += [ ### gcmole(arch:mips) ###
......@@ -240,6 +243,7 @@ v8_executable("cctest") {
"test-code-stubs.h",
"test-disasm-mips.cc",
"test-macro-assembler-mips.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "mipsel") {
sources += [ ### gcmole(arch:mipsel) ###
......@@ -249,6 +253,7 @@ v8_executable("cctest") {
"test-code-stubs.h",
"test-disasm-mips.cc",
"test-macro-assembler-mips.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "mips64") {
sources += [ ### gcmole(arch:mips64) ###
......@@ -258,6 +263,7 @@ v8_executable("cctest") {
"test-code-stubs.h",
"test-disasm-mips64.cc",
"test-macro-assembler-mips64.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "mips64el") {
sources += [ ### gcmole(arch:mips64el) ###
......@@ -267,6 +273,7 @@ v8_executable("cctest") {
"test-code-stubs.h",
"test-disasm-mips64.cc",
"test-macro-assembler-mips64.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "x64") {
sources += [ ### gcmole(arch:x64) ###
......@@ -278,7 +285,6 @@ v8_executable("cctest") {
"test-log-stack-tracer.cc",
"test-macro-assembler-x64.cc",
"test-run-wasm-relocation-x64.cc",
"wasm/test-run-wasm-simd-lowering.cc",
"wasm/test-run-wasm-simd.cc",
]
} else if (v8_current_cpu == "x87") {
......@@ -291,6 +297,7 @@ v8_executable("cctest") {
"test-log-stack-tracer.cc",
"test-macro-assembler-x87.cc",
"test-run-wasm-relocation-x87.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
sources += [ ### gcmole(arch:ppc) ###
......@@ -298,6 +305,7 @@ v8_executable("cctest") {
"test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-ppc.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
sources += [ ### gcmole(arch:s390) ###
......@@ -305,6 +313,7 @@ v8_executable("cctest") {
"test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-s390.cc",
"wasm/test-run-wasm-simd-lowering.cc",
]
}
......
......@@ -225,7 +225,8 @@
'test-disasm-ia32.cc',
'test-macro-assembler-ia32.cc',
'test-log-stack-tracer.cc',
'test-run-wasm-relocation-ia32.cc'
'test-run-wasm-relocation-ia32.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_x64': [ ### gcmole(arch:x64) ###
'test-assembler-x64.cc',
......@@ -237,7 +238,6 @@
'test-log-stack-tracer.cc',
'test-run-wasm-relocation-x64.cc',
'wasm/test-run-wasm-simd.cc',
'wasm/test-run-wasm-simd-lowering.cc',
],
'cctest_sources_arm': [ ### gcmole(arch:arm) ###
'test-assembler-arm.cc',
......@@ -246,7 +246,8 @@
'test-code-stubs-arm.cc',
'test-disasm-arm.cc',
'test-macro-assembler-arm.cc',
'test-run-wasm-relocation-arm.cc'
'test-run-wasm-relocation-arm.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_arm64': [ ### gcmole(arch:arm64) ###
'test-utils-arm64.cc',
......@@ -259,19 +260,22 @@
'test-fuzz-arm64.cc',
'test-javascript-arm64.cc',
'test-js-arm64-variables.cc',
'test-run-wasm-relocation-arm64.cc'
'test-run-wasm-relocation-arm64.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_s390': [ ### gcmole(arch:s390) ###
'test-assembler-s390.cc',
'test-code-stubs.cc',
'test-code-stubs.h',
'test-disasm-s390.cc'
'test-disasm-s390.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_ppc': [ ### gcmole(arch:ppc) ###
'test-assembler-ppc.cc',
'test-code-stubs.cc',
'test-code-stubs.h',
'test-disasm-ppc.cc'
'test-disasm-ppc.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_mips': [ ### gcmole(arch:mips) ###
'test-assembler-mips.cc',
......@@ -279,7 +283,8 @@
'test-code-stubs.h',
'test-code-stubs-mips.cc',
'test-disasm-mips.cc',
'test-macro-assembler-mips.cc'
'test-macro-assembler-mips.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_mipsel': [ ### gcmole(arch:mipsel) ###
'test-assembler-mips.cc',
......@@ -287,7 +292,8 @@
'test-code-stubs.h',
'test-code-stubs-mips.cc',
'test-disasm-mips.cc',
'test-macro-assembler-mips.cc'
'test-macro-assembler-mips.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_mips64': [ ### gcmole(arch:mips64) ###
'test-assembler-mips64.cc',
......@@ -295,7 +301,8 @@
'test-code-stubs.h',
'test-code-stubs-mips64.cc',
'test-disasm-mips64.cc',
'test-macro-assembler-mips64.cc'
'test-macro-assembler-mips64.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_mips64el': [ ### gcmole(arch:mips64el) ###
'test-assembler-mips64.cc',
......@@ -303,7 +310,8 @@
'test-code-stubs.h',
'test-code-stubs-mips64.cc',
'test-disasm-mips64.cc',
'test-macro-assembler-mips64.cc'
'test-macro-assembler-mips64.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
'cctest_sources_x87': [ ### gcmole(arch:x87) ###
'test-assembler-x87.cc',
......@@ -313,7 +321,8 @@
'test-disasm-x87.cc',
'test-macro-assembler-x87.cc',
'test-log-stack-tracer.cc',
'test-run-wasm-relocation-x87.cc'
'test-run-wasm-relocation-x87.cc',
'wasm/test-run-wasm-simd-lowering.cc'
],
},
'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
......
......@@ -307,7 +307,9 @@ inline void TestBuildingGraph(Zone* zone, JSGraph* jsgraph, ModuleEnv* module,
FATAL(str.str().c_str());
}
builder.Int64LoweringForTesting();
builder.SimdScalarLoweringForTesting();
if (!CpuFeatures::SupportsSimd128()) {
builder.SimdScalarLoweringForTesting();
}
}
template <typename ReturnType>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment