Skip to content

Commit

Permalink
Use local core_arch and switch to clang-12
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieCunliffe committed Aug 25, 2021
1 parent 0ff70cc commit 6056cfc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ci/docker/aarch64-unknown-linux-gnu/Dockerfile
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion ci/run.sh
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion crates/intrinsic-test/src/main.rs
Expand Up @@ -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}
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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::<Vec<_>>();
intrinsics.dedup();

Expand Down

0 comments on commit 6056cfc

Please sign in to comment.