Created attachment 187217 [details] mfbt/tests/TestLinkedList.cpp (preprocessed, compressed) $ pkg install autoconf213 gmake python27 binutils mercurial $ hg clone https://hg.mozilla.org/mozilla-central $ cd mozilla-central/js/src $ autoconf-2.13 $ ./configure --disable-jemalloc $ gmake [...] /usr/bin/clang++ -std=gnu++11 -o TestLinkedList.o -c -I/tmp/mozilla-central/js/src/dist/system_wrappers -include /tmp/mozilla-central/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DIMPL_MFBT -I/tmp/mozilla-central/mfbt/tests -I/tmp/mozilla-central/js/src/mfbt/tests -I/tmp/mozilla-central/js/src/dist/include -I/tmp/mozilla-central/js/src/dist/include/testing -fPIC -DMOZILLA_CLIENT -include /tmp/mozilla-central/js/src/js/src/js-confdefs.h -MD -MP -MF .deps/TestLinkedList.o.pp -Qunused-arguments -Qunused-arguments -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++11-compat-pedantic -Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wno-gnu-zero-variadic-macro-arguments -Wformat-security -Wno-noexcept-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-rtti -fno-exceptions -fno-math-errno -pipe -g -O -fno-omit-frame-pointer -Wno-error=shadow /tmp/mozilla-central/mfbt/tests/TestLinkedList.cpp Assertion failed: (isReg() && "This is not a register operand!"), function getReg, file /tmp/12.0/contrib/llvm/include/llvm/CodeGen/MachineOperand.h, line 278. clang++: error: unable to execute command: Abort trap clang++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM 5.0.0svn) Target: aarch64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin
Clang 4.0 on 11.1-RELEASE appears to be unaffected.
Created attachment 187218 [details] command line args (for clang 5.0)
Forgot to mention the intent. Until bug 221185 and bug 223009 are fixed building JS standalone is the only way to check www/firefox for regressions on aarch64.
I can reproduce this, and will reduce/bisect.
This regressed by the upstream commit https://reviews.llvm.org/rL308025, I reported a bug here: https://bugs.llvm.org/show_bug.cgi?id=34979
A commit references this bug: Author: dim Date: Sat Oct 21 19:14:45 UTC 2017 New revision: 324826 URL: https://svnweb.freebsd.org/changeset/base/324826 Log: Pull in r316035 from upstream llvm trunk (by Tim Northover): AArch64: account for possible frame index operand in compares. If the address of a local is used in a comparison, AArch64 can fold the address-calculation into the comparison via "adds". Unfortunately, a couple of places (both hit in this one test) are not ready to deal with that yet and just assume the first source operand is a register. This should fix an assertion failure while building the test suite of www/firefox for AArch64. PR: 223048 MFC after: 3 days Changes: head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
A commit references this bug: Author: dim Date: Tue Oct 24 06:49:07 UTC 2017 New revision: 324946 URL: https://svnweb.freebsd.org/changeset/base/324946 Log: MFC r324826: Pull in r316035 from upstream llvm trunk (by Tim Northover): AArch64: account for possible frame index operand in compares. If the address of a local is used in a comparison, AArch64 can fold the address-calculation into the comparison via "adds". Unfortunately, a couple of places (both hit in this one test) are not ready to deal with that yet and just assume the first source operand is a register. This should fix an assertion failure while building the test suite of www/firefox for AArch64. PR: 223048 Changes: _U stable/11/ stable/11/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp