Skip to content

[SR-4726] Clang abort in Function Pass Manager on aarch64 #47303

Open
@swift-ci

Description

@swift-ci
Previous ID SR-4726
Radar None
Original Reporter helge (JIRA User)
Type Bug

Attachment: Download

Environment

uname -a
Linux scw-66d779 4.9.23-std-1 #1 SMP Mon Apr 24 13:18:14 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

cat /proc/cpuinfo
processor : 0
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1

processor : 1
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1

processor : 2
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1

processor : 3
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1

processor : 4
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1

processor : 5
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1

processor : 6
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1

processor : 7
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, arm, armv8
Assignee None
Priority Medium

md5: 92b91016174ceafe6aa002189872d65f

Issue Description:

I'm trying to build Swift 3.1.1 on a Scaleway ARMv8 instance. This goes surprisingly far, but eventually clang fails on libdispatch/src/source.c.

clang-4.0: /swiftsrc/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7065: void llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite): Assertion `ConstraintID != InlineAsm::Constraint_Unknown && "Failed to convert memory constraint code to constraint id."' failed.
#​0 0x00000000014da90c llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/swiftsrc/build/buildbot_linux/llvm-linux-aarch64/bin/clang-4.0+0x14da90c)
Stack dump:
0.  Program arguments: /swiftsrc/build/buildbot_linux/llvm-linux-aarch64/bin/clang-4.0 -cc1 -triple aarch64-unknown-linux-gnu -emit-obj -disable-free -main-file-name source.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu generic -target-feature +neon -target-abi aapcs -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-file /swiftsrc/build/buildbot_linux/libdispatch-linux-aarch64/src/.libs/source.o -resource-dir /swiftsrc/build/buildbot_linux/llvm-linux-aarch64/bin/../lib/clang/4.0.0 -isystem /usr/include/bsd -D HAVE_CONFIG_H -I . -I /swiftsrc/swift-corelibs-libdispatch/src -I ../config -I .. -I /swiftsrc/swift-corelibs-libdispatch -I /swiftsrc/swift-corelibs-libdispatch/private -I /swiftsrc/swift-corelibs-libdispatch/libpwq/include -D LIBBSD_OVERLAY -I /swiftsrc/swift-corelibs-libdispatch/src/BlocksRuntime -D PIC -internal-isystem /usr/local/include -internal-isystem /swiftsrc/build/buildbot_linux/llvm-linux-aarch64/bin/../lib/clang/4.0.0/include -internal-externc-isystem /usr/include/aarch64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -fdebug-compilation-dir /swiftsrc/build/buildbot_linux/libdispatch-linux-aarch64/src -ferror-limit 19 -fmessage-length 132 -fvisibility hidden -fallow-half-arguments-and-returns -fblocks -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o .libs/source.o -x c /swiftsrc/swift-corelibs-libdispatch/src/source.c 
1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module '/swiftsrc/swift-corelibs-libdispatch/src/source.c'.
4.  Running pass 'AArch64 Instruction Selection' on function '@_dispatch_mgr_invoke'
clang-4.0: error: unable to execute command: Aborted
clang-4.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 4.0.0 (https://github.com/apple/swift-clang.git f38438fc0161d13f2deb8b1cfb201af562692364) (https://github.com/apple/swift-llvm.git 9cb6a3ccee03e78b4258d2af093de0891b003d60)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /swiftsrc/build/buildbot_linux/llvm-linux-aarch64/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    armArchitecture: any ARMarmv8Architecture: ARMv8bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions