From 6056cfc5348f17a89380854844a6d5d1c3c04018 Mon Sep 17 00:00:00 2001 From: Jamie Cunliffe Date: Tue, 17 Aug 2021 16:00:55 +0100 Subject: [PATCH] Use local core_arch and switch to clang-12 --- ci/docker/aarch64-unknown-linux-gnu/Dockerfile | 2 +- ci/run.sh | 2 +- crates/intrinsic-test/src/main.rs | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile index f0c1493ab8..2b43841907 100644 --- a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ qemu-user \ make \ file \ - clang-9 \ + clang-12 \ lld ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ diff --git a/ci/run.sh b/ci/run.sh index cd7a04d23f..e5e6aed1c5 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -115,7 +115,7 @@ esac if [ "${TARGET}" = "aarch64-unknown-linux-gnu" ]; then export CPPFLAGS="-fuse-ld=lld -I/usr/aarch64-linux-gnu/include/ -I/usr/aarch64-linux-gnu/include/c++/9/aarch64-linux-gnu/" - cargo run ${INTRINSIC_TEST} --release --bin intrinsic-test -- crates/intrinsic-test/neon-intrinsics.csv --runner "${CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER}" --cppcompiler "clang++-9" + cargo run ${INTRINSIC_TEST} --release --bin intrinsic-test -- crates/intrinsic-test/neon-intrinsics.csv --runner "${CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER}" --cppcompiler "clang++-12" fi if [ "$NORUN" != "1" ] && [ "$NOSTD" != 1 ]; then diff --git a/crates/intrinsic-test/src/main.rs b/crates/intrinsic-test/src/main.rs index 2ee4635064..c5ff2b5487 100644 --- a/crates/intrinsic-test/src/main.rs +++ b/crates/intrinsic-test/src/main.rs @@ -70,7 +70,7 @@ fn generate_rust_program(intrinsic: &Intrinsic) -> String { #![feature(link_llvm_intrinsics)] #![feature(stdsimd)] #![allow(overflowing_literals)] -use core::arch::aarch64::*; +use core_arch::arch::aarch64::*; fn main() {{ {passes} @@ -159,6 +159,8 @@ version = "{version}" authors = ["{authors}"] edition = "2018" [workspace] +[dependencies] +core_arch = {{ path = "../crates/core_arch" }} {binaries}"#, version = env!("CARGO_PKG_VERSION"), authors = env!("CARGO_PKG_AUTHORS"), @@ -288,6 +290,11 @@ fn main() { .is_none() }) .filter(|i| i.arguments.iter().find(|a| a.name == "n").is_none()) + // clang-12 fails to compile this intrinsic due to an error. + // fatal error: error in backend: Cannot select: 0x2b99c30: i64 = AArch64ISD::VSHL Constant:i64<1>, Constant:i32<1> + // 0x2b9a520: i64 = Constant<1> + // 0x2b9a248: i32 = Constant<1> + .filter(|i| !["vshld_s64", "vshld_u64"].contains(&i.name.as_str())) .collect::>(); intrinsics.dedup();