Created attachment 208902 [details]
security/openssl111 fails to build on 13.0-CURRENT r354143 with error:
Assertion failed: (isSimple() && "Expected a SimpleValueType!"), function getSimpleVT, file /usr/src/contrib/llvm/include/llvm/CodeGen/ValueTypes.h, line 253.
- Latest ports tree, default port OPTIONS
- DEFAULT_VERSIONS= perl5=5.30 ssl=openssl111 python=2.7
CFLAGS= -O2 -pipe -fcolor-diagnostics
Build log tail/backtrace, sources and script attached
Also found bug 213865 and the following freebsd-multimedia thread which looks similar:
Created attachment 208904 [details]
- Commenting out CPUTYPE?=corei7-avx (all else the same) results in a successful build, / no assertion error.
- Removing -O2 (leaving CPUTYPE?=corei7-avx, and all else the same) results in a successful build / no assertion error.
- Using -O1 (leaving CPUTYPE?=corei7-avx, and all else the same) results in a successful build / no assertion error.
- Changing CPUTYPE?=corei7-avx -> sandybridge (all else the same), results in assertion error
Additional environment information:
- CPU: Intel Core i7-2600K
- FreeBSD is VirtualBox guest (dmest.boot attached)
Reproduced and reported upstream: https://bugs.llvm.org/show_bug.cgi?id=43916
A commit references this bug:
Date: Thu Nov 7 06:59:10 UTC 2019
New revision: 354429
Merge commit 8e34dd941 from llvm git (by Sanjay Patel):
[x86] avoid crashing when splitting AVX stores with non-simple type
The store splitting transform was assuming a simple type (MVT), but
that's not necessarily the case as shown in the test.
This should fix 'Assertion failed: (isSimple() && "Expected a
SimpleValueType!")' when building the security/openssl111 port targeting
a CPU that supports AVX, but not AVX2, such as sandybridge.
MFC after: 1 month
Thank you Dimitry
Any workarounds/changes that can be made to openssl111 in the meantime?
(In reply to Kubilay Kocak from comment #5)
Yes, just make sure the CPU type is not set, or set to something other than: sandybridge, core-avx-i or corei7-avx.
Thanks Dimitry :)
Will leave this in progress pending MFC
If MFC is not required in stable/11 (due to it being a recent regression), just set the flag value to -
This got fixed for stable/12 with the MFC of clang 9.0.1.