about summary refs log tree commit diff
path: root/src/test/run-make
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-10-23 00:59:14 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-10-23 00:59:14 -0700
commit086f5a55be73dff71ce5d93f16cdf5652d833090 (patch)
treeda23072131ac5e092d2142a8797622eaebf8f929 /src/test/run-make
parentd570b36cd9dd0a3c1b94e6fc4004ee5557140d31 (diff)
downloadrust-086f5a55be73dff71ce5d93f16cdf5652d833090.tar.gz
rust-086f5a55be73dff71ce5d93f16cdf5652d833090.zip
Revert "rustc: Fix (again) simd vectors by-val in ABI"
This reverts commit 3cc8f738d4247a9b475d8e074b621e602ac2b7be.
Diffstat (limited to 'src/test/run-make')
-rw-r--r--src/test/run-make/simd-argument-promotion-thwarted/Makefile13
-rw-r--r--src/test/run-make/simd-argument-promotion-thwarted/t1.rs21
-rw-r--r--src/test/run-make/simd-argument-promotion-thwarted/t2.rs14
-rw-r--r--src/test/run-make/simd-argument-promotion-thwarted/t3.rs52
4 files changed, 0 insertions, 100 deletions
diff --git a/src/test/run-make/simd-argument-promotion-thwarted/Makefile b/src/test/run-make/simd-argument-promotion-thwarted/Makefile
deleted file mode 100644
index 3095432d0fe..00000000000
--- a/src/test/run-make/simd-argument-promotion-thwarted/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
--include ../../run-make-fulldeps/tools.mk
-
-ifeq ($(TARGET),x86_64-unknown-linux-gnu)
-all:
-	$(RUSTC) t1.rs -C opt-level=3
-	$(TMPDIR)/t1
-	$(RUSTC) t2.rs -C opt-level=3
-	$(TMPDIR)/t2
-	$(RUSTC) t3.rs -C opt-level=3
-	$(TMPDIR)/t3
-else
-all:
-endif
diff --git a/src/test/run-make/simd-argument-promotion-thwarted/t1.rs b/src/test/run-make/simd-argument-promotion-thwarted/t1.rs
deleted file mode 100644
index cb4a3dd7d4a..00000000000
--- a/src/test/run-make/simd-argument-promotion-thwarted/t1.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-use std::arch::x86_64;
-
-fn main() {
-    if !is_x86_feature_detected!("avx2") {
-        return println!("AVX2 is not supported on this machine/build.");
-    }
-    let load_bytes: [u8; 32] = [0x0f; 32];
-    let lb_ptr = load_bytes.as_ptr();
-    let reg_load = unsafe {
-        x86_64::_mm256_loadu_si256(
-            lb_ptr as *const x86_64::__m256i
-        )
-    };
-    println!("{:?}", reg_load);
-    let mut store_bytes: [u8; 32] = [0; 32];
-    let sb_ptr = store_bytes.as_mut_ptr();
-    unsafe {
-        x86_64::_mm256_storeu_si256(sb_ptr as *mut x86_64::__m256i, reg_load);
-    }
-    assert_eq!(load_bytes, store_bytes);
-}
diff --git a/src/test/run-make/simd-argument-promotion-thwarted/t2.rs b/src/test/run-make/simd-argument-promotion-thwarted/t2.rs
deleted file mode 100644
index 0e42b82a223..00000000000
--- a/src/test/run-make/simd-argument-promotion-thwarted/t2.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-use std::arch::x86_64::*;
-
-fn main() {
-    if !is_x86_feature_detected!("avx") {
-        return println!("AVX is not supported on this machine/build.");
-    }
-    unsafe {
-        let f = _mm256_set_pd(2.0, 2.0, 2.0, 2.0);
-        let r = _mm256_mul_pd(f, f);
-
-        union A { a: __m256d, b: [f64; 4] }
-        assert_eq!(A { a: r }.b, [4.0, 4.0, 4.0, 4.0]);
-    }
-}
diff --git a/src/test/run-make/simd-argument-promotion-thwarted/t3.rs b/src/test/run-make/simd-argument-promotion-thwarted/t3.rs
deleted file mode 100644
index 10062ab3e46..00000000000
--- a/src/test/run-make/simd-argument-promotion-thwarted/t3.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-use std::arch::x86_64::*;
-
-#[target_feature(enable = "avx")]
-unsafe fn avx_mul(a: __m256, b: __m256) -> __m256 {
-    _mm256_mul_ps(a, b)
-}
-
-#[target_feature(enable = "avx")]
-unsafe fn avx_store(p: *mut f32, a: __m256) {
-    _mm256_storeu_ps(p, a)
-}
-
-#[target_feature(enable = "avx")]
-unsafe fn avx_setr(a: f32, b: f32, c: f32, d: f32, e: f32, f: f32, g: f32, h: f32) -> __m256 {
-    _mm256_setr_ps(a, b, c, d, e, f, g, h)
-}
-
-#[target_feature(enable = "avx")]
-unsafe fn avx_set1(a: f32) -> __m256 {
-    _mm256_set1_ps(a)
-}
-
-struct Avx(__m256);
-
-fn mul(a: Avx, b: Avx) -> Avx {
-    unsafe { Avx(avx_mul(a.0, b.0)) }
-}
-
-fn set1(a: f32) -> Avx {
-    unsafe { Avx(avx_set1(a)) }
-}
-
-fn setr(a: f32, b: f32, c: f32, d: f32, e: f32, f: f32, g: f32, h: f32) -> Avx {
-    unsafe { Avx(avx_setr(a, b, c, d, e, f, g, h)) }
-}
-
-unsafe fn store(p: *mut f32, a: Avx) {
-    avx_store(p, a.0);
-}
-
-fn main() {
-    if !is_x86_feature_detected!("avx") {
-        return println!("AVX is not supported on this machine/build.");
-    }
-    let mut result = [0.0f32; 8];
-    let a = mul(setr(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0), set1(0.25));
-    unsafe {
-        store(result.as_mut_ptr(), a);
-    }
-
-    assert_eq!(result, [0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.50, 1.75]);
-}