Created attachment 190085 [details] fxemu.cpp (compressed, preprocessed) $ echo CPUTYPE?=haswell >>/etc/make.conf $ cd emulators/snes9x $ make [...] c++ -fno-rtti -I/wrkdirs/usr/ports/emulators/snes9x/work/snes9x-1.51-src/unzip -I/wrkdirs/usr/ports/emulators/snes9x/work/snes9x-1.51-src -I/usr/local/include -c -O2 -pipe -march=haswell -fstack-protector -fno-strict-aliasing -I/wrkdirs/usr/ports/emulators/snes9x/work/snes9x-1.51-src/unzip -I/wrkdirs/usr/ports/emulators/snes9x/work/snes9x-1.51-src -I/usr/local/include -DMITSHM -DCPU_SHUTDOWN -DSPC700_SHUTDOWN -DUSE_THREADS -DSPC700_C -DNETPLAY_SUPPORT -DUNZIP_SUPPORT -DJMA_SUPPORT -DSDD1_DECOMP -DCORRECT_VRAM_READS -DJOYSTICK_SUPPORT -DNO_INLINE_SET_GET -DNOASM -DNEW_COLOUR_BLENDING -DZLIB -DHAVE_LIBPNG -DHAVE_MKSTEMP -DHAVE_STRINGS_H -DHAVE_SYS_IOCTL_H -DHAVE_STDINT_H -DPTR_NOT_INT -DRIGHTSHIFT_int8_IS_SAR -DRIGHTSHIFT_int16_IS_SAR -DRIGHTSHIFT_int32_IS_SAR -DRIGHTSHIFT_int64_IS_SAR -DRIGHTSHIFT_IS_SAR '-DACCEPT_SIZE_T=socklen_t' fxinst.cpp -o fxinst.o c++ -fno-rtti -I/wrkdirs/usr/ports/emulators/snes9x/work/snes9x-1.51-src/unzip -I/wrkdirs/usr/ports/emulators/snes9x/work/snes9x-1.51-src -I/usr/local/include -c -O2 -pipe -march=haswell -fstack-protector -fno-strict-aliasing -I/wrkdirs/usr/ports/emulators/snes9x/work/snes9x-1.51-src/unzip -I/wrkdirs/usr/ports/emulators/snes9x/work/snes9x-1.51-src -I/usr/local/include -DMITSHM -DCPU_SHUTDOWN -DSPC700_SHUTDOWN -DUSE_THREADS -DSPC700_C -DNETPLAY_SUPPORT -DUNZIP_SUPPORT -DJMA_SUPPORT -DSDD1_DECOMP -DCORRECT_VRAM_READS -DJOYSTICK_SUPPORT -DNO_INLINE_SET_GET -DNOASM -DNEW_COLOUR_BLENDING -DZLIB -DHAVE_LIBPNG -DHAVE_MKSTEMP -DHAVE_STRINGS_H -DHAVE_SYS_IOCTL_H -DHAVE_STDINT_H -DPTR_NOT_INT -DRIGHTSHIFT_int8_IS_SAR -DRIGHTSHIFT_int16_IS_SAR -DRIGHTSHIFT_int32_IS_SAR -DRIGHTSHIFT_int64_IS_SAR -DRIGHTSHIFT_IS_SAR '-DACCEPT_SIZE_T=socklen_t' fxemu.cpp -o fxemu.o Assertion failed: (New->getType() == getType() && "replaceAllUses of value with new value of different type!"), function doRAUW, file /poudriere/jails/head-amd64/usr/src/contrib/llvm/lib/IR/Value.cpp, line 404. c++: error: unable to execute command: Abort trap c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 6.0.0 (branches/release_60 323338) (based on LLVM 6.0.0) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin
Created attachment 190086 [details] command line args (for clang 6.0)
Clang 4 builds fine but Clang 5 crashes with a bit different error: 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'Function Pass Manager' on module 'fxemu-e9d1b4.cpp'. 4. Running pass 'Loop Pass Manager' on function '@_Z24fx_computeScreenPointersv' 5. Running pass 'Unroll loops' on basic block '%vector.body425'
Reproduced, minimized, and reported upstream here: https://bugs.llvm.org/show_bug.cgi?id=36116
A commit references this bug: Author: dim Date: Fri Mar 16 17:50:44 UTC 2018 New revision: 331065 URL: https://svnweb.freebsd.org/changeset/base/331065 Log: Pull in r327638 from upstream llvm trunk (by Matthew Simpson): [ConstantFolding, InstSimplify] Handle more vector GEPs This patch addresses some additional cases where the compiler crashes upon encountering vector GEPs. This should fix PR36116. Differential Revision: https://reviews.llvm.org/D44219 Reference: https://bugs.llvm.org/show_bug.cgi?id=36116 This fixes an assertion when building the emulators/snes9x port. Reported by: jbeich PR: 225471 MFC after: 3 months X-MFC-With: r327952 Changes: head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/IR/ConstantFold.cpp
A commit references this bug: Author: dim Date: Fri Oct 26 21:20:06 UTC 2018 New revision: 483054 URL: https://svnweb.freebsd.org/changeset/ports/483054 Log: Add all patches from base llvm/clang/lld/lldb 6.0 to devel/llvm60 This adds all the patches that were applied in the past to head, under contrib/llvm. After these, there only minimal diffs left between the port sources and the base sources. Most of these remaining diffs are due to #ifdef shortcuts in the base sources, because we don't compile certain features in. Other diffs are because the port has applied a few changes that we don't have in base. While here, use Makefile.LICENSE from the devel/llvm-devel port. Approved by: brooks (maintainer) Reviewed by: brooks PR: 212343, 225128, 225471, 226388, 226658, 226872, 229050, 230444, 230604, 231355 MFH: 2018Q4 Differential Revision: https://reviews.freebsd.org/D17702 Changes: head/devel/llvm60/Makefile head/devel/llvm60/files/clang/patch-head-r331066.diff head/devel/llvm60/files/clang/patch-head-r336227.diff head/devel/llvm60/files/clang/patch-head-r338697.diff head/devel/llvm60/files/clang/patch-head-r339019.diff head/devel/llvm60/files/lld/ head/devel/llvm60/files/lld/patch-head-r331731.diff head/devel/llvm60/files/lld/patch-head-r333401.diff head/devel/llvm60/files/lld/patch-head-r336664.diff head/devel/llvm60/files/lld/patch-head-r336972.diff head/devel/llvm60/files/lld/patch-head-r337282.diff head/devel/llvm60/files/lld/patch-head-r338251.diff head/devel/llvm60/files/lld/patch-head-r338682.diff head/devel/llvm60/files/lld/patch-head-r339013.diff head/devel/llvm60/files/lld/patch-head-r339304.diff head/devel/llvm60/files/lldb/ head/devel/llvm60/files/lldb/patch-head-r332849.diff head/devel/llvm60/files/lldb/patch-head-r332965.diff head/devel/llvm60/files/patch-head-r308867.diff head/devel/llvm60/files/patch-head-r330686.diff head/devel/llvm60/files/patch-head-r331065.diff head/devel/llvm60/files/patch-head-r331366.diff head/devel/llvm60/files/patch-head-r336969.diff head/devel/llvm60/files/patch-head-r336970.diff head/devel/llvm60/files/patch-head-r337615.diff head/devel/llvm60/files/patch-head-r338689.diff
A commit references this bug: Author: dim Date: Wed Oct 31 18:49:07 UTC 2018 New revision: 483602 URL: https://svnweb.freebsd.org/changeset/ports/483602 Log: MFH: r481120 Update to a new snapshot. Update LICENSE data per mailing list feedback and move to a seperate Makefile.LICENSE for use by other llvm ports. MFH: r483054 Add all patches from base llvm/clang/lld/lldb 6.0 to devel/llvm60 This adds all the patches that were applied in the past to head, under contrib/llvm. After these, there only minimal diffs left between the port sources and the base sources. Most of these remaining diffs are due to #ifdef shortcuts in the base sources, because we don't compile certain features in. Other diffs are because the port has applied a few changes that we don't have in base. While here, use Makefile.LICENSE from the devel/llvm-devel port. Approved by: portmgr (miwi) Reviewed by: brooks PR: 212343, 225128, 225471, 226388, 226658, 226872, 229050, 230444, 230604, 231355 Differential Revision: https://reviews.freebsd.org/D17702 Changes: _U branches/2018Q4/ branches/2018Q4/devel/llvm-devel/Makefile branches/2018Q4/devel/llvm-devel/Makefile.LICENSE branches/2018Q4/devel/llvm-devel/Makefile.snapshot branches/2018Q4/devel/llvm-devel/distinfo branches/2018Q4/devel/llvm-devel/files/lldb-patch-tools_lldb_source_Plugins_Process_FreeBSD_ProcessFreeBSD.cpp branches/2018Q4/devel/llvm-devel/pkg-plist branches/2018Q4/devel/llvm60/Makefile branches/2018Q4/devel/llvm60/files/clang/patch-head-r331066.diff branches/2018Q4/devel/llvm60/files/clang/patch-head-r336227.diff branches/2018Q4/devel/llvm60/files/clang/patch-head-r338697.diff branches/2018Q4/devel/llvm60/files/clang/patch-head-r339019.diff branches/2018Q4/devel/llvm60/files/lld/ branches/2018Q4/devel/llvm60/files/lldb/ branches/2018Q4/devel/llvm60/files/patch-head-r308867.diff branches/2018Q4/devel/llvm60/files/patch-head-r330686.diff branches/2018Q4/devel/llvm60/files/patch-head-r331065.diff branches/2018Q4/devel/llvm60/files/patch-head-r331366.diff branches/2018Q4/devel/llvm60/files/patch-head-r336969.diff branches/2018Q4/devel/llvm60/files/patch-head-r336970.diff branches/2018Q4/devel/llvm60/files/patch-head-r337615.diff branches/2018Q4/devel/llvm60/files/patch-head-r338689.diff