Fix ABI, run and fix more tests, re-enable CI for PRs
This commit is contained in:
parent
9a55103b98
commit
5b56c660c9
46 changed files with 206 additions and 135 deletions
|
@ -970,6 +970,7 @@ impl<'a> Builder<'a> {
|
|||
Some("-Wl,-rpath,@loader_path/../lib")
|
||||
} else if !target.contains("windows") &&
|
||||
!target.contains("wasm32") &&
|
||||
!target.contains("emscripten") &&
|
||||
!target.contains("fuchsia") {
|
||||
Some("-Wl,-rpath,$ORIGIN/../lib")
|
||||
} else {
|
||||
|
|
|
@ -1046,8 +1046,11 @@ impl Step for Compiletest {
|
|||
|
||||
// Also provide `rust_test_helpers` for the host.
|
||||
builder.ensure(native::TestHelpers { target: compiler.host });
|
||||
// As well as the target
|
||||
builder.ensure(native::TestHelpers { target });
|
||||
|
||||
// As well as the target, except for plain wasm32, which can't build it
|
||||
if !target.contains("wasm32") || target.contains("emscripten") {
|
||||
builder.ensure(native::TestHelpers { target });
|
||||
}
|
||||
|
||||
builder.ensure(RemoteCopyLibs { compiler, target });
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@ jobs:
|
|||
IMAGE: x86_64-gnu-llvm-6.0
|
||||
mingw-check:
|
||||
IMAGE: mingw-check
|
||||
asmjs:
|
||||
IMAGE: asmjs
|
||||
wasm32:
|
||||
IMAGE: wasm32
|
||||
|
||||
- job: LinuxTools
|
||||
timeoutInMinutes: 600
|
||||
|
|
|
@ -28,8 +28,7 @@ ENV EM_CONFIG=/emsdk-portable/.emscripten
|
|||
|
||||
ENV TARGETS=asmjs-unknown-emscripten
|
||||
|
||||
# TODO: Run run-fail, libcore, libstd, etc. once exceptions are enabled
|
||||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS src/test/ui
|
||||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS
|
||||
|
||||
# This is almost identical to the wasm32-unknown-emscripten target, so
|
||||
# running with assertions again is not useful
|
||||
|
|
|
@ -28,5 +28,11 @@ ENV EM_CONFIG=/emsdk-portable/.emscripten
|
|||
|
||||
ENV TARGETS=wasm32-unknown-emscripten
|
||||
|
||||
# TODO: Run run-fail, libcore, libstd, etc. once exceptions are enabled
|
||||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS src/test/ui
|
||||
# FIXME: Re-enable these tests once Cargo stops trying to execute wasms
|
||||
ENV SCRIPT python2.7 ../x.py test --target $TARGETS \
|
||||
--exclude src/libcore \
|
||||
--exclude src/liballoc \
|
||||
--exclude src/libproc_macro \
|
||||
--exclude src/libstd \
|
||||
--exclude src/libterm \
|
||||
--exclude src/libtest
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
use std::cmp;
|
||||
use std::collections::BinaryHeap;
|
||||
use std::collections::binary_heap::{Drain, PeekMut};
|
||||
use std::panic::{self, AssertUnwindSafe};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
use rand::{thread_rng, seq::SliceRandom};
|
||||
|
||||
#[test]
|
||||
fn test_iterator() {
|
||||
|
@ -281,9 +276,15 @@ fn assert_covariance() {
|
|||
// even if the order may not be correct.
|
||||
//
|
||||
// Destructors must be called exactly once per element.
|
||||
// FIXME: re-enable emscripten once it can unwind again
|
||||
#[test]
|
||||
#[cfg(not(miri))] // Miri does not support catching panics
|
||||
#[cfg(not(any(miri, target_os = "emscripten")))] // Miri does not support catching panics
|
||||
fn panic_safe() {
|
||||
use std::cmp;
|
||||
use std::panic::{self, AssertUnwindSafe};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use rand::{thread_rng, seq::SliceRandom};
|
||||
|
||||
static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
#[derive(Eq, PartialEq, Ord, Clone, Debug)]
|
||||
|
|
|
@ -483,7 +483,7 @@ mod slice_index {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(target_arch = "asmjs"))] // hits an OOM
|
||||
#[cfg(not(target_os = "emscripten"))] // hits an OOM
|
||||
#[cfg(not(miri))] // Miri is too slow
|
||||
fn simple_big() {
|
||||
fn a_million_letter_x() -> String {
|
||||
|
|
10
src/liballoc/tests/str.rs.rej
Normal file
10
src/liballoc/tests/str.rs.rej
Normal file
|
@ -0,0 +1,10 @@
|
|||
diff a/src/liballoc/tests/str.rs b/src/liballoc/tests/str.rs (rejected hunks)
|
||||
@@ -483,7 +483,7 @@ mod slice_index {
|
||||
}
|
||||
|
||||
#[test]
|
||||
- #[cfg(not(target_arch = "asmjs"))] // hits an OOM
|
||||
+ #[cfg(not(target_arch = "js"))] // hits an OOM
|
||||
#[cfg(not(miri))] // Miri is too slow
|
||||
fn simple_big() {
|
||||
fn a_million_letter_x() -> String {
|
|
@ -944,8 +944,10 @@ fn drain_filter_complex() {
|
|||
}
|
||||
}
|
||||
|
||||
// Miri does not support catching panics
|
||||
// FIXME: re-enable emscripten once it can unwind again
|
||||
#[test]
|
||||
#[cfg(not(miri))] // Miri does not support catching panics
|
||||
#[cfg(not(any(miri, target_os = "emscripten")))]
|
||||
fn drain_filter_consumed_panic() {
|
||||
use std::rc::Rc;
|
||||
use std::sync::Mutex;
|
||||
|
@ -995,8 +997,9 @@ fn drain_filter_consumed_panic() {
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics
|
||||
#[test]
|
||||
#[cfg(not(miri))] // Miri does not support catching panics
|
||||
#[cfg(not(any(miri, target_os = "emscripten")))] // Miri does not support catching panics
|
||||
fn drain_filter_unconsumed_panic() {
|
||||
use std::rc::Rc;
|
||||
use std::sync::Mutex;
|
||||
|
|
|
@ -1,29 +1,47 @@
|
|||
use crate::abi::call::{FnType, ArgType, Uniform};
|
||||
use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
|
||||
|
||||
fn unwrap_trivial_aggregate<'a, Ty, C>(cx: &C, val: &mut ArgType<'a, Ty>) -> bool
|
||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout
|
||||
{
|
||||
if val.layout.is_aggregate() {
|
||||
if let Some(unit) = val.layout.homogeneous_aggregate(cx).unit() {
|
||||
let size = val.layout.size;
|
||||
if unit.size == size {
|
||||
val.cast_to(Uniform {
|
||||
unit,
|
||||
total: size
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
|
||||
fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'a, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout
|
||||
{
|
||||
ret.extend_integer_width_to(32);
|
||||
if ret.layout.is_aggregate() {
|
||||
if let Some(unit) = ret.layout.homogeneous_aggregate(cx).unit() {
|
||||
let size = ret.layout.size;
|
||||
if unit.size == size {
|
||||
ret.cast_to(Uniform {
|
||||
unit,
|
||||
total: size
|
||||
});
|
||||
return;
|
||||
}
|
||||
if !unwrap_trivial_aggregate(cx, ret) {
|
||||
ret.make_indirect();
|
||||
}
|
||||
|
||||
ret.make_indirect();
|
||||
}
|
||||
}
|
||||
|
||||
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
|
||||
fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<'a, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout
|
||||
{
|
||||
arg.extend_integer_width_to(32);
|
||||
if arg.layout.is_aggregate() {
|
||||
arg.make_indirect_byval();
|
||||
if !unwrap_trivial_aggregate(cx, arg) {
|
||||
arg.make_indirect_byval();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +55,6 @@ pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'a, Ty>)
|
|||
|
||||
for arg in &mut fty.args {
|
||||
if arg.is_ignore() { continue; }
|
||||
classify_arg_ty(arg);
|
||||
classify_arg_ty(cx, arg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ pub fn target() -> Result<Target, String> {
|
|||
"ASSERTIONS=1".to_string(),
|
||||
"-s".to_string(),
|
||||
"DISABLE_EXCEPTION_CATCHING=1".to_string(),
|
||||
"-s".to_string(),
|
||||
"ABORTING_MALLOC=0".to_string(),
|
||||
// FIXME(tlively): Enable this linker option once libc type errors
|
||||
// are resolved. See https://github.com/rust-lang/libc/pull/1478.
|
||||
// "-Wl,--fatal-warnings".to_string(),
|
||||
|
|
|
@ -1478,9 +1478,9 @@ pub fn run_test(
|
|||
) {
|
||||
let TestDescAndFn { desc, testfn } = test;
|
||||
|
||||
let ignore_because_no_process_support = cfg!(target_arch = "wasm32")
|
||||
&& !cfg!(target_os = "emscripten")
|
||||
&& desc.should_panic != ShouldPanic::No;
|
||||
// FIXME: Re-enable emscripten once it can catch panics again
|
||||
let ignore_because_no_process_support = desc.should_panic != ShouldPanic::No
|
||||
&& (cfg!(target_arch = "wasm32") || cfg!(target_os = "emscripten"));
|
||||
|
||||
if force_ignore || desc.ignore || ignore_because_no_process_support {
|
||||
monitor_ch.send((desc, TrIgnored, None, Vec::new())).unwrap();
|
||||
|
|
|
@ -2,7 +2,7 @@ use super::*;
|
|||
|
||||
use crate::test::{
|
||||
filter_tests, parse_opts, run_test, DynTestFn, DynTestName, MetricMap, RunIgnored, RunStrategy,
|
||||
ShouldPanic, StaticTestName, TestDesc, TestDescAndFn, TestOpts, TrFailedMsg,
|
||||
ShouldPanic, StaticTestName, TestDesc, TestDescAndFn, TestOpts,
|
||||
TrIgnored, TrOk,
|
||||
};
|
||||
use std::sync::mpsc::channel;
|
||||
|
@ -90,7 +90,9 @@ pub fn ignored_tests_result_in_ignored() {
|
|||
assert!(res == TrIgnored);
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
fn test_should_panic() {
|
||||
fn f() {
|
||||
panic!();
|
||||
|
@ -110,7 +112,9 @@ fn test_should_panic() {
|
|||
assert!(res == TrOk);
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
fn test_should_panic_good_message() {
|
||||
fn f() {
|
||||
panic!("an error message");
|
||||
|
@ -130,8 +134,11 @@ fn test_should_panic_good_message() {
|
|||
assert!(res == TrOk);
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
fn test_should_panic_bad_message() {
|
||||
use crate::tests::TrFailedMsg;
|
||||
fn f() {
|
||||
panic!("an error message");
|
||||
}
|
||||
|
@ -152,7 +159,9 @@ fn test_should_panic_bad_message() {
|
|||
assert!(res == TrFailedMsg(format!("{} '{}'", failed_msg, expected)));
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
fn test_should_panic_but_succeeds() {
|
||||
fn f() {}
|
||||
let desc = TestDescAndFn {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// ignore-emscripten compiled with panic=abort by default
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
// ignore-tidy-linelength
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// ignore-emscripten compiled with panic=abort by default
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// ignore-emscripten compiled with panic=abort by default
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// ignore-emscripten default visibility is hidden
|
||||
// compile-flags: -O
|
||||
// `#[no_mangle]`d static variables always have external linkage, i.e., no `internal` in their
|
||||
// definitions
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// ignore-emscripten default visibility is hidden
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// ignore-msvc
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
|
||||
// compile-flags: -O -C no-prepopulate-passes
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// compile-flags: -C no-prepopulate-passes
|
||||
|
||||
// ignore-aarch64
|
||||
// ignore-asmjs
|
||||
// ignore-emscripten
|
||||
// ignore-mips64
|
||||
// ignore-powerpc
|
||||
// ignore-powerpc64
|
||||
|
@ -9,7 +9,6 @@
|
|||
// ignore-s390x
|
||||
// ignore-sparc
|
||||
// ignore-sparc64
|
||||
// ignore-wasm
|
||||
// ignore-x86
|
||||
// ignore-x86_64
|
||||
// See repr-transparent.rs
|
||||
|
|
|
@ -119,140 +119,140 @@ extern "platform-intrinsic" {
|
|||
// CHECK-LABEL: @sadd_i8x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i8x2(x: i8x2, y: i8x2) -> i8x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i8> @llvm.sadd.sat.v2i8(<2 x i8> %{{[0-9]+}}, <2 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i8> @llvm.sadd.sat.v2i8(<2 x i8> %{{[0-9a-z]+}}, <2 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i8x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i8x4(x: i8x4, y: i8x4) -> i8x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i8> @llvm.sadd.sat.v4i8(<4 x i8> %{{[0-9]+}}, <4 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i8> @llvm.sadd.sat.v4i8(<4 x i8> %{{[0-9a-z]+}}, <4 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i8x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i8x8(x: i8x8, y: i8x8) -> i8x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i8> @llvm.sadd.sat.v8i8(<8 x i8> %{{[0-9]+}}, <8 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i8> @llvm.sadd.sat.v8i8(<8 x i8> %{{[0-9a-z]+}}, <8 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i8x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i8x16(x: i8x16, y: i8x16) -> i8x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %{{[0-9a-z]+}}, <16 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i8x32
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i8x32(x: i8x32, y: i8x32) -> i8x32 {
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i8> @llvm.sadd.sat.v32i8(<32 x i8> %{{[0-9]+}}, <32 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i8> @llvm.sadd.sat.v32i8(<32 x i8> %{{[0-9a-z]+}}, <32 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i8x64
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i8x64(x: i8x64, y: i8x64) -> i8x64 {
|
||||
// CHECK: %{{[0-9]+}} = call <64 x i8> @llvm.sadd.sat.v64i8(<64 x i8> %{{[0-9]+}}, <64 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <64 x i8> @llvm.sadd.sat.v64i8(<64 x i8> %{{[0-9a-z]+}}, <64 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i16x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i16x2(x: i16x2, y: i16x2) -> i16x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i16> @llvm.sadd.sat.v2i16(<2 x i16> %{{[0-9]+}}, <2 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i16> @llvm.sadd.sat.v2i16(<2 x i16> %{{[0-9a-z]+}}, <2 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i16x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i16x4(x: i16x4, y: i16x4) -> i16x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i16> @llvm.sadd.sat.v4i16(<4 x i16> %{{[0-9]+}}, <4 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i16> @llvm.sadd.sat.v4i16(<4 x i16> %{{[0-9a-z]+}}, <4 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i16x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i16x8(x: i16x8, y: i16x8) -> i16x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %{{[0-9]+}}, <8 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %{{[0-9a-z]+}}, <8 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i16x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i16x16(x: i16x16, y: i16x16) -> i16x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i16> @llvm.sadd.sat.v16i16(<16 x i16> %{{[0-9]+}}, <16 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i16> @llvm.sadd.sat.v16i16(<16 x i16> %{{[0-9a-z]+}}, <16 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i16x32
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i16x32(x: i16x32, y: i16x32) -> i16x32 {
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i16> @llvm.sadd.sat.v32i16(<32 x i16> %{{[0-9]+}}, <32 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i16> @llvm.sadd.sat.v32i16(<32 x i16> %{{[0-9a-z]+}}, <32 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i32x2(x: i32x2, y: i32x2) -> i32x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i32> @llvm.sadd.sat.v2i32(<2 x i32> %{{[0-9]+}}, <2 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i32> @llvm.sadd.sat.v2i32(<2 x i32> %{{[0-9a-z]+}}, <2 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i32x4(x: i32x4, y: i32x4) -> i32x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %{{[0-9]+}}, <4 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %{{[0-9a-z]+}}, <4 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i32x8(x: i32x8, y: i32x8) -> i32x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.sadd.sat.v8i32(<8 x i32> %{{[0-9]+}}, <8 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.sadd.sat.v8i32(<8 x i32> %{{[0-9a-z]+}}, <8 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i32x16(x: i32x16, y: i32x16) -> i32x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i32> @llvm.sadd.sat.v16i32(<16 x i32> %{{[0-9]+}}, <16 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i32> @llvm.sadd.sat.v16i32(<16 x i32> %{{[0-9a-z]+}}, <16 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i64x2(x: i64x2, y: i64x2) -> i64x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i64> @llvm.sadd.sat.v2i64(<2 x i64> %{{[0-9]+}}, <2 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i64> @llvm.sadd.sat.v2i64(<2 x i64> %{{[0-9a-z]+}}, <2 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i64x4(x: i64x4, y: i64x4) -> i64x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i64> @llvm.sadd.sat.v4i64(<4 x i64> %{{[0-9]+}}, <4 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i64> @llvm.sadd.sat.v4i64(<4 x i64> %{{[0-9a-z]+}}, <4 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i64x8(x: i64x8, y: i64x8) -> i64x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i64> @llvm.sadd.sat.v8i64(<8 x i64> %{{[0-9]+}}, <8 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i64> @llvm.sadd.sat.v8i64(<8 x i64> %{{[0-9a-z]+}}, <8 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i128x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i128x2(x: i128x2, y: i128x2) -> i128x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i128> @llvm.sadd.sat.v2i128(<2 x i128> %{{[0-9]+}}, <2 x i128> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i128> @llvm.sadd.sat.v2i128(<2 x i128> %{{[0-9a-z]+}}, <2 x i128> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @sadd_i128x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn sadd_i128x4(x: i128x4, y: i128x4) -> i128x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i128> @llvm.sadd.sat.v4i128(<4 x i128> %{{[0-9]+}}, <4 x i128> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i128> @llvm.sadd.sat.v4i128(<4 x i128> %{{[0-9a-z]+}}, <4 x i128> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
|
@ -261,140 +261,140 @@ pub unsafe fn sadd_i128x4(x: i128x4, y: i128x4) -> i128x4 {
|
|||
// CHECK-LABEL: @uadd_u8x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u8x2(x: u8x2, y: u8x2) -> u8x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> %{{[0-9]+}}, <2 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> %{{[0-9a-z]+}}, <2 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u8x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u8x4(x: u8x4, y: u8x4) -> u8x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i8> @llvm.uadd.sat.v4i8(<4 x i8> %{{[0-9]+}}, <4 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i8> @llvm.uadd.sat.v4i8(<4 x i8> %{{[0-9a-z]+}}, <4 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u8x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u8x8(x: u8x8, y: u8x8) -> u8x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i8> @llvm.uadd.sat.v8i8(<8 x i8> %{{[0-9]+}}, <8 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i8> @llvm.uadd.sat.v8i8(<8 x i8> %{{[0-9a-z]+}}, <8 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u8x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u8x16(x: u8x16, y: u8x16) -> u8x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %{{[0-9a-z]+}}, <16 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u8x32
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u8x32(x: u8x32, y: u8x32) -> u8x32 {
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i8> @llvm.uadd.sat.v32i8(<32 x i8> %{{[0-9]+}}, <32 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i8> @llvm.uadd.sat.v32i8(<32 x i8> %{{[0-9a-z]+}}, <32 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u8x64
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u8x64(x: u8x64, y: u8x64) -> u8x64 {
|
||||
// CHECK: %{{[0-9]+}} = call <64 x i8> @llvm.uadd.sat.v64i8(<64 x i8> %{{[0-9]+}}, <64 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <64 x i8> @llvm.uadd.sat.v64i8(<64 x i8> %{{[0-9a-z]+}}, <64 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u16x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u16x2(x: u16x2, y: u16x2) -> u16x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i16> @llvm.uadd.sat.v2i16(<2 x i16> %{{[0-9]+}}, <2 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i16> @llvm.uadd.sat.v2i16(<2 x i16> %{{[0-9a-z]+}}, <2 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u16x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u16x4(x: u16x4, y: u16x4) -> u16x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i16> @llvm.uadd.sat.v4i16(<4 x i16> %{{[0-9]+}}, <4 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i16> @llvm.uadd.sat.v4i16(<4 x i16> %{{[0-9a-z]+}}, <4 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u16x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u16x8(x: u16x8, y: u16x8) -> u16x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %{{[0-9]+}}, <8 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %{{[0-9a-z]+}}, <8 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u16x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u16x16(x: u16x16, y: u16x16) -> u16x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i16> @llvm.uadd.sat.v16i16(<16 x i16> %{{[0-9]+}}, <16 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i16> @llvm.uadd.sat.v16i16(<16 x i16> %{{[0-9a-z]+}}, <16 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u16x32
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u16x32(x: u16x32, y: u16x32) -> u16x32 {
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i16> @llvm.uadd.sat.v32i16(<32 x i16> %{{[0-9]+}}, <32 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i16> @llvm.uadd.sat.v32i16(<32 x i16> %{{[0-9a-z]+}}, <32 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u32x2(x: u32x2, y: u32x2) -> u32x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i32> @llvm.uadd.sat.v2i32(<2 x i32> %{{[0-9]+}}, <2 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i32> @llvm.uadd.sat.v2i32(<2 x i32> %{{[0-9a-z]+}}, <2 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u32x4(x: u32x4, y: u32x4) -> u32x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %{{[0-9]+}}, <4 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %{{[0-9a-z]+}}, <4 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u32x8(x: u32x8, y: u32x8) -> u32x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.uadd.sat.v8i32(<8 x i32> %{{[0-9]+}}, <8 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.uadd.sat.v8i32(<8 x i32> %{{[0-9a-z]+}}, <8 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u32x16(x: u32x16, y: u32x16) -> u32x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i32> @llvm.uadd.sat.v16i32(<16 x i32> %{{[0-9]+}}, <16 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i32> @llvm.uadd.sat.v16i32(<16 x i32> %{{[0-9a-z]+}}, <16 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u64x2(x: u64x2, y: u64x2) -> u64x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> %{{[0-9]+}}, <2 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> %{{[0-9a-z]+}}, <2 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u64x4(x: u64x4, y: u64x4) -> u64x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i64> @llvm.uadd.sat.v4i64(<4 x i64> %{{[0-9]+}}, <4 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i64> @llvm.uadd.sat.v4i64(<4 x i64> %{{[0-9a-z]+}}, <4 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u64x8(x: u64x8, y: u64x8) -> u64x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i64> @llvm.uadd.sat.v8i64(<8 x i64> %{{[0-9]+}}, <8 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i64> @llvm.uadd.sat.v8i64(<8 x i64> %{{[0-9a-z]+}}, <8 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u128x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u128x2(x: u128x2, y: u128x2) -> u128x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i128> @llvm.uadd.sat.v2i128(<2 x i128> %{{[0-9]+}}, <2 x i128> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i128> @llvm.uadd.sat.v2i128(<2 x i128> %{{[0-9a-z]+}}, <2 x i128> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @uadd_u128x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn uadd_u128x4(x: u128x4, y: u128x4) -> u128x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i128> @llvm.uadd.sat.v4i128(<4 x i128> %{{[0-9]+}}, <4 x i128> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i128> @llvm.uadd.sat.v4i128(<4 x i128> %{{[0-9a-z]+}}, <4 x i128> %{{[0-9a-z]+}})
|
||||
simd_saturating_add(x, y)
|
||||
}
|
||||
|
||||
|
@ -405,140 +405,140 @@ pub unsafe fn uadd_u128x4(x: u128x4, y: u128x4) -> u128x4 {
|
|||
// CHECK-LABEL: @ssub_i8x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i8x2(x: i8x2, y: i8x2) -> i8x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i8> @llvm.ssub.sat.v2i8(<2 x i8> %{{[0-9]+}}, <2 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i8> @llvm.ssub.sat.v2i8(<2 x i8> %{{[0-9a-z]+}}, <2 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i8x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i8x4(x: i8x4, y: i8x4) -> i8x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i8> @llvm.ssub.sat.v4i8(<4 x i8> %{{[0-9]+}}, <4 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i8> @llvm.ssub.sat.v4i8(<4 x i8> %{{[0-9a-z]+}}, <4 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i8x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i8x8(x: i8x8, y: i8x8) -> i8x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i8> @llvm.ssub.sat.v8i8(<8 x i8> %{{[0-9]+}}, <8 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i8> @llvm.ssub.sat.v8i8(<8 x i8> %{{[0-9a-z]+}}, <8 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i8x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i8x16(x: i8x16, y: i8x16) -> i8x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %{{[0-9a-z]+}}, <16 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i8x32
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i8x32(x: i8x32, y: i8x32) -> i8x32 {
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i8> @llvm.ssub.sat.v32i8(<32 x i8> %{{[0-9]+}}, <32 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i8> @llvm.ssub.sat.v32i8(<32 x i8> %{{[0-9a-z]+}}, <32 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i8x64
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i8x64(x: i8x64, y: i8x64) -> i8x64 {
|
||||
// CHECK: %{{[0-9]+}} = call <64 x i8> @llvm.ssub.sat.v64i8(<64 x i8> %{{[0-9]+}}, <64 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <64 x i8> @llvm.ssub.sat.v64i8(<64 x i8> %{{[0-9a-z]+}}, <64 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i16x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i16x2(x: i16x2, y: i16x2) -> i16x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i16> @llvm.ssub.sat.v2i16(<2 x i16> %{{[0-9]+}}, <2 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i16> @llvm.ssub.sat.v2i16(<2 x i16> %{{[0-9a-z]+}}, <2 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i16x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i16x4(x: i16x4, y: i16x4) -> i16x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i16> @llvm.ssub.sat.v4i16(<4 x i16> %{{[0-9]+}}, <4 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i16> @llvm.ssub.sat.v4i16(<4 x i16> %{{[0-9a-z]+}}, <4 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i16x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i16x8(x: i16x8, y: i16x8) -> i16x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %{{[0-9]+}}, <8 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %{{[0-9a-z]+}}, <8 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i16x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i16x16(x: i16x16, y: i16x16) -> i16x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i16> @llvm.ssub.sat.v16i16(<16 x i16> %{{[0-9]+}}, <16 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i16> @llvm.ssub.sat.v16i16(<16 x i16> %{{[0-9a-z]+}}, <16 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i16x32
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i16x32(x: i16x32, y: i16x32) -> i16x32 {
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i16> @llvm.ssub.sat.v32i16(<32 x i16> %{{[0-9]+}}, <32 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i16> @llvm.ssub.sat.v32i16(<32 x i16> %{{[0-9a-z]+}}, <32 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i32x2(x: i32x2, y: i32x2) -> i32x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i32> @llvm.ssub.sat.v2i32(<2 x i32> %{{[0-9]+}}, <2 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i32> @llvm.ssub.sat.v2i32(<2 x i32> %{{[0-9a-z]+}}, <2 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i32x4(x: i32x4, y: i32x4) -> i32x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %{{[0-9]+}}, <4 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %{{[0-9a-z]+}}, <4 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i32x8(x: i32x8, y: i32x8) -> i32x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.ssub.sat.v8i32(<8 x i32> %{{[0-9]+}}, <8 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.ssub.sat.v8i32(<8 x i32> %{{[0-9a-z]+}}, <8 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i32x16(x: i32x16, y: i32x16) -> i32x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i32> @llvm.ssub.sat.v16i32(<16 x i32> %{{[0-9]+}}, <16 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i32> @llvm.ssub.sat.v16i32(<16 x i32> %{{[0-9a-z]+}}, <16 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i64x2(x: i64x2, y: i64x2) -> i64x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i64> @llvm.ssub.sat.v2i64(<2 x i64> %{{[0-9]+}}, <2 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i64> @llvm.ssub.sat.v2i64(<2 x i64> %{{[0-9a-z]+}}, <2 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i64x4(x: i64x4, y: i64x4) -> i64x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i64> @llvm.ssub.sat.v4i64(<4 x i64> %{{[0-9]+}}, <4 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i64> @llvm.ssub.sat.v4i64(<4 x i64> %{{[0-9a-z]+}}, <4 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i64x8(x: i64x8, y: i64x8) -> i64x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i64> @llvm.ssub.sat.v8i64(<8 x i64> %{{[0-9]+}}, <8 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i64> @llvm.ssub.sat.v8i64(<8 x i64> %{{[0-9a-z]+}}, <8 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i128x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i128x2(x: i128x2, y: i128x2) -> i128x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i128> @llvm.ssub.sat.v2i128(<2 x i128> %{{[0-9]+}}, <2 x i128> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i128> @llvm.ssub.sat.v2i128(<2 x i128> %{{[0-9a-z]+}}, <2 x i128> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ssub_i128x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn ssub_i128x4(x: i128x4, y: i128x4) -> i128x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i128> @llvm.ssub.sat.v4i128(<4 x i128> %{{[0-9]+}}, <4 x i128> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i128> @llvm.ssub.sat.v4i128(<4 x i128> %{{[0-9a-z]+}}, <4 x i128> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
|
@ -547,139 +547,139 @@ pub unsafe fn ssub_i128x4(x: i128x4, y: i128x4) -> i128x4 {
|
|||
// CHECK-LABEL: @usub_u8x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u8x2(x: u8x2, y: u8x2) -> u8x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i8> @llvm.usub.sat.v2i8(<2 x i8> %{{[0-9]+}}, <2 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i8> @llvm.usub.sat.v2i8(<2 x i8> %{{[0-9a-z]+}}, <2 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u8x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u8x4(x: u8x4, y: u8x4) -> u8x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i8> @llvm.usub.sat.v4i8(<4 x i8> %{{[0-9]+}}, <4 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i8> @llvm.usub.sat.v4i8(<4 x i8> %{{[0-9a-z]+}}, <4 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u8x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u8x8(x: u8x8, y: u8x8) -> u8x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i8> @llvm.usub.sat.v8i8(<8 x i8> %{{[0-9]+}}, <8 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i8> @llvm.usub.sat.v8i8(<8 x i8> %{{[0-9a-z]+}}, <8 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u8x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u8x16(x: u8x16, y: u8x16) -> u8x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %{{[0-9a-z]+}}, <16 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u8x32
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u8x32(x: u8x32, y: u8x32) -> u8x32 {
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i8> @llvm.usub.sat.v32i8(<32 x i8> %{{[0-9]+}}, <32 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i8> @llvm.usub.sat.v32i8(<32 x i8> %{{[0-9a-z]+}}, <32 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u8x64
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u8x64(x: u8x64, y: u8x64) -> u8x64 {
|
||||
// CHECK: %{{[0-9]+}} = call <64 x i8> @llvm.usub.sat.v64i8(<64 x i8> %{{[0-9]+}}, <64 x i8> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <64 x i8> @llvm.usub.sat.v64i8(<64 x i8> %{{[0-9a-z]+}}, <64 x i8> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u16x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u16x2(x: u16x2, y: u16x2) -> u16x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i16> @llvm.usub.sat.v2i16(<2 x i16> %{{[0-9]+}}, <2 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i16> @llvm.usub.sat.v2i16(<2 x i16> %{{[0-9a-z]+}}, <2 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u16x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u16x4(x: u16x4, y: u16x4) -> u16x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i16> @llvm.usub.sat.v4i16(<4 x i16> %{{[0-9]+}}, <4 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i16> @llvm.usub.sat.v4i16(<4 x i16> %{{[0-9a-z]+}}, <4 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u16x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u16x8(x: u16x8, y: u16x8) -> u16x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %{{[0-9]+}}, <8 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %{{[0-9a-z]+}}, <8 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u16x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u16x16(x: u16x16, y: u16x16) -> u16x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i16> @llvm.usub.sat.v16i16(<16 x i16> %{{[0-9]+}}, <16 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i16> @llvm.usub.sat.v16i16(<16 x i16> %{{[0-9a-z]+}}, <16 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u16x32
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u16x32(x: u16x32, y: u16x32) -> u16x32 {
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i16> @llvm.usub.sat.v32i16(<32 x i16> %{{[0-9]+}}, <32 x i16> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <32 x i16> @llvm.usub.sat.v32i16(<32 x i16> %{{[0-9a-z]+}}, <32 x i16> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u32x2(x: u32x2, y: u32x2) -> u32x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i32> @llvm.usub.sat.v2i32(<2 x i32> %{{[0-9]+}}, <2 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i32> @llvm.usub.sat.v2i32(<2 x i32> %{{[0-9a-z]+}}, <2 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u32x4(x: u32x4, y: u32x4) -> u32x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %{{[0-9]+}}, <4 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %{{[0-9a-z]+}}, <4 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u32x8(x: u32x8, y: u32x8) -> u32x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.usub.sat.v8i32(<8 x i32> %{{[0-9]+}}, <8 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.usub.sat.v8i32(<8 x i32> %{{[0-9a-z]+}}, <8 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u32x16(x: u32x16, y: u32x16) -> u32x16 {
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i32> @llvm.usub.sat.v16i32(<16 x i32> %{{[0-9]+}}, <16 x i32> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <16 x i32> @llvm.usub.sat.v16i32(<16 x i32> %{{[0-9a-z]+}}, <16 x i32> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u64x2(x: u64x2, y: u64x2) -> u64x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> %{{[0-9]+}}, <2 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> %{{[0-9a-z]+}}, <2 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u64x4(x: u64x4, y: u64x4) -> u64x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i64> @llvm.usub.sat.v4i64(<4 x i64> %{{[0-9]+}}, <4 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i64> @llvm.usub.sat.v4i64(<4 x i64> %{{[0-9a-z]+}}, <4 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u64x8(x: u64x8, y: u64x8) -> u64x8 {
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i64> @llvm.usub.sat.v8i64(<8 x i64> %{{[0-9]+}}, <8 x i64> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <8 x i64> @llvm.usub.sat.v8i64(<8 x i64> %{{[0-9a-z]+}}, <8 x i64> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u128x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u128x2(x: u128x2, y: u128x2) -> u128x2 {
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i128> @llvm.usub.sat.v2i128(<2 x i128> %{{[0-9]+}}, <2 x i128> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <2 x i128> @llvm.usub.sat.v2i128(<2 x i128> %{{[0-9a-z]+}}, <2 x i128> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @usub_u128x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn usub_u128x4(x: u128x4, y: u128x4) -> u128x4 {
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i128> @llvm.usub.sat.v4i128(<4 x i128> %{{[0-9]+}}, <4 x i128> %{{[0-9]+}})
|
||||
// CHECK: %{{[0-9]+}} = call <4 x i128> @llvm.usub.sat.v4i128(<4 x i128> %{{[0-9a-z]+}}, <4 x i128> %{{[0-9a-z]+}})
|
||||
simd_saturating_sub(x, y)
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ extern "platform-intrinsic" {
|
|||
// CHECK-LABEL: @bitmask_int
|
||||
#[no_mangle]
|
||||
pub unsafe fn bitmask_int(x: i32x2) -> u8 {
|
||||
// CHECK: [[A:%[0-9]+]] = lshr <2 x i32> %{{[0-9]+}}, <i32 31, i32 31>
|
||||
// CHECK: [[A:%[0-9]+]] = lshr <2 x i32> %{{[0-9a-z]+}}, <i32 31, i32 31>
|
||||
// CHECK: [[B:%[0-9]+]] = trunc <2 x i32> [[A]] to <2 x i1>
|
||||
// CHECK: [[C:%[0-9]+]] = bitcast <2 x i1> [[B]] to i2
|
||||
// CHECK: %{{[0-9]+}} = zext i2 [[C]] to i8
|
||||
|
@ -39,7 +39,7 @@ pub unsafe fn bitmask_int(x: i32x2) -> u8 {
|
|||
// CHECK-LABEL: @bitmask_uint
|
||||
#[no_mangle]
|
||||
pub unsafe fn bitmask_uint(x: u32x2) -> u8 {
|
||||
// CHECK: [[A:%[0-9]+]] = lshr <2 x i32> %{{[0-9]+}}, <i32 31, i32 31>
|
||||
// CHECK: [[A:%[0-9]+]] = lshr <2 x i32> %{{[0-9a-z]+}}, <i32 31, i32 31>
|
||||
// CHECK: [[B:%[0-9]+]] = trunc <2 x i32> [[A]] to <2 x i1>
|
||||
// CHECK: [[C:%[0-9]+]] = bitcast <2 x i1> [[B]] to i2
|
||||
// CHECK: %{{[0-9]+}} = zext i2 [[C]] to i8
|
||||
|
@ -49,7 +49,7 @@ pub unsafe fn bitmask_uint(x: u32x2) -> u8 {
|
|||
// CHECK-LABEL: @bitmask_int16
|
||||
#[no_mangle]
|
||||
pub unsafe fn bitmask_int16(x: i8x16) -> u16 {
|
||||
// CHECK: [[A:%[0-9]+]] = lshr <16 x i8> %{{[0-9]+}}, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
|
||||
// CHECK: [[A:%[0-9]+]] = lshr <16 x i8> %{{[0-9a-z]+}}, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
|
||||
// CHECK: [[B:%[0-9]+]] = trunc <16 x i8> [[A]] to <16 x i1>
|
||||
// CHECK: %{{[0-9]+}} = bitcast <16 x i1> [[B]] to i16
|
||||
// CHECK-NOT: zext
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// ignore-emscripten vectors passed directly
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
|
||||
// This test that using union forward the abi of the inner type, as
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// aux-build:weak-lang-items.rs
|
||||
// error-pattern: `#[panic_handler]` function required, but not found
|
||||
// error-pattern: language item required, but not found: `eh_personality`
|
||||
// ignore-wasm32-bare compiled with panic=abort, personality not required
|
||||
// ignore-emscripten compiled with panic=abort, personality not required
|
||||
|
||||
#![no_std]
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Test that we detect changes to the `dep_kind` query. If the change is not
|
||||
// detected then -Zincremental-verify-ich will trigger an assertion.
|
||||
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
// revisions:cfail1 cfail2
|
||||
// compile-flags: -Z query-dep-graph -Cpanic=unwind
|
||||
// build-pass (FIXME(62277): could be check-pass?)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Test that changing a tracked commandline argument invalidates
|
||||
// the cache while changing an untracked one doesn't.
|
||||
|
||||
// ignore-asmjs wasm2js does not support source maps yet
|
||||
// revisions:rpass1 rpass2 rpass3
|
||||
// compile-flags: -Z query-dep-graph
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// compile-flags: -Z query-dep-graph -g
|
||||
// aux-build:extern_crate.rs
|
||||
|
||||
// ignore-asmjs wasm2js does not support source maps yet
|
||||
// This test case makes sure that we detect if paths emitted into debuginfo
|
||||
// are changed, even when the change happens in an external crate.
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// the spans and this test makes sure that we handle them correctly by hashing
|
||||
// file:line:column instead of raw byte offset.
|
||||
|
||||
// ignore-asmjs wasm2js does not support source maps yet
|
||||
// revisions:rpass1 rpass2
|
||||
// compile-flags: -g -Z query-dep-graph
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Test that moving a type definition within a source file does not affect
|
||||
// re-compilation.
|
||||
|
||||
// ignore-asmjs wasm2js does not support source maps yet
|
||||
// revisions:rpass1 rpass2
|
||||
// compile-flags: -Z query-dep-graph -g
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
// revisions:rpass1 rpass2
|
||||
|
||||
// ignore-asmjs wasm2js does not support source maps yet
|
||||
// compile-flags: -g -Z query-dep-graph
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
|
||||
#![feature(box_syntax)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
|
||||
// Test that we generate StorageDead on unwind paths for generators.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
|
||||
// check that we don't emit multiple drop flags when they are not needed.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// check that we don't forget to drop the Box if we early return before
|
||||
// initializing it
|
||||
// ignore-tidy-linelength
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
|
||||
#![feature(box_syntax)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
|
||||
// Test that after the call to `std::mem::drop` we do not generate a
|
||||
// MIR drop of the argument. (We used to have a `DROP(_2)` in the code
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
|
||||
fn main() {
|
||||
let mut x = Packed(Aligned(Droppy(0)));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Test that the fake borrows for matches are removed after borrow checking.
|
||||
|
||||
// ignore-wasm32-bare
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
|
||||
fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
|
||||
match x {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// ignore-emscripten compiled with panic=abort by default
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags: -Z mir-emit-retag -Z mir-opt-level=0 -Z span_free_formats
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
# only-wasm32
|
||||
# only-wasm32-bare
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs --target wasm32-unknown-unknown
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
# only-wasm32
|
||||
# only-wasm32-bare
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs -O --target wasm32-unknown-unknown
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
# only-wasm32
|
||||
# only-wasm32-bare
|
||||
|
||||
all:
|
||||
$(RUSTC) bar.rs --target wasm32-unknown-unknown
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
# only-wasm32
|
||||
# only-wasm32-bare
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs --target wasm32-unknown-unknown
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
# only-wasm32
|
||||
# only-wasm32-bare
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown --cfg a
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
# only-wasm32
|
||||
# only-wasm32-bare
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs --target wasm32-unknown-unknown
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
# only-wasm32
|
||||
# only-wasm32-bare
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs --target wasm32-unknown-unknown
|
||||
|
|
|
@ -141,7 +141,10 @@ impl EarlyProps {
|
|||
if config.target == "wasm32-unknown-unknown" && config.parse_check_run_results(ln) {
|
||||
props.ignore = Ignore::Ignore;
|
||||
}
|
||||
|
||||
// FIXME: Re-enable run-fail once panics are handled correctly
|
||||
if config.target.contains("emscripten") && config.mode == common::RunFail {
|
||||
props.ignore = Ignore::Ignore;
|
||||
}
|
||||
}
|
||||
|
||||
if (config.mode == common::DebugInfoGdb || config.mode == common::DebugInfoGdbLldb) &&
|
||||
|
|
Loading…
Add table
Reference in a new issue