Cranelift: ensure ISA level needed for SIMD is present when SIMD is enabled. (#3816)

Addresses #3809: when we are asked to create a Cranelift backend with
shared flags that indicate support for SIMD, we should check that the
ISA level needed for our SIMD lowerings is present.
This commit is contained in:
Chris Fallin
2022-02-16 17:29:30 -08:00
committed by GitHub
parent ef17a36852
commit 1c014d129a
55 changed files with 172 additions and 84 deletions

View File

@@ -1,6 +1,6 @@
test compile precise-output
set enable_simd
target x86_64 has_ssse3 has_sse41
target x86_64 has_sse3 has_ssse3 has_sse41
;; shuffle

View File

@@ -1,7 +1,7 @@
test run
set enable_simd
target aarch64
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %bitselect_i32x4(i32x4, i32x4, i32x4) -> i32x4 {
block0(v0: i32x4, v1: i32x4, v2: i32x4):

View File

@@ -2,7 +2,7 @@ test run
target aarch64
; target s390x TODO: Not yet implemented on s390x
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %icmp_eq_i8x16() -> b8 {
block0:

View File

@@ -2,7 +2,7 @@ test run
target aarch64
; target s390x TODO: Not yet implemented on s390x
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %fcvt_from_sint(i32x4) -> f32x4 {
block0(v0: i32x4):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %extractlane_4(i8x16) -> i8 {
block0(v0: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %iabs_i8x16(i8x16) -> i8x16 {
block0(v0: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %insertlane_15(i8x16, i8) -> i8x16 {
block0(v0: i8x16, v1: i8):

View File

@@ -2,7 +2,7 @@ test run
target aarch64
; target s390x TODO: Not yet implemented on s390x
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
;; shuffle

View File

@@ -2,7 +2,7 @@ test run
target aarch64
; target s390x TODO: Not yet implemented on s390x
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %bnot() -> b32 {
block0:

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %saddsat_i8x16(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %shuffle_i8x16(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %snarrow_i16x8(i16x8, i16x8) -> i8x16 {
block0(v0: i16x8, v1: i16x8):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %splat_i8x16(i8) -> i8x16 {
block0(v0: i8):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %sqmulrs_i16x8(i16x8, i16x8) -> i16x8 {
block0(v0: i16x8, v1: i16x8):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %ssubsat_i8x16(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %swidenhigh_i8x16(i8x16) -> i16x8 {
block0(v0: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %swidenlow_i8x16(i8x16) -> i16x8 {
block0(v0: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %swizzle_i8x16(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %uaddsat_i8x16(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %unarrow_i16x8(i16x8, i16x8) -> i8x16 {
block0(v0: i16x8, v1: i16x8):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %usubsat_i8x16(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %uwidenhigh_i8x16(i8x16) -> i16x8 {
block0(v0: i8x16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %uwidenlow_i8x16(i8x16) -> i16x8 {
block0(v0: i8x16):

View File

@@ -2,7 +2,7 @@ test run
; target s390x TODO: Not yet implemented on s390x
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %vconst_zeroes() -> b1 {

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %vhighbits_i8x16(i8x16) -> i16 {
block0(v0: i8x16):

View File

@@ -3,7 +3,7 @@ test run
; target s390x TODO: Not yet implemented on s390x
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %vselect_i8x16() -> i8x16 {
block0:

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %wpdps(i16x8, i16x8) -> i32x4 {
block0(v0: i16x8, v1: i16x8):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %smulhi_i16(i16, i16) -> i16 {
block0(v0: i16, v1: i16):

View File

@@ -2,7 +2,7 @@ test interpret
test run
target aarch64
set enable_simd
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
target s390x
function %umulhi_i16(i16, i16) -> i16 {

View File

@@ -1,7 +1,7 @@
test verifier
set enable_simd=true
target aarch64
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %scalar_to_vector() {
block0:

View File

@@ -1,7 +1,7 @@
test verifier
set enable_simd
target aarch64
target x86_64
target x86_64 has_sse3 has_ssse3 has_sse41
function %insertlane_i32x4() {
block0: