Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Mar 2019 12:39:06 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        Dimitry Andric <dim@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, ports-list freebsd <freebsd-ports@freebsd.org>
Subject:   powerpc64 head -r344825:  system-clang (8.0.0) asserts compiling mesa-dri-18.3.2_2's glsl/ir_clone.cpp: "Target supports vector op, but scalar requires expansion?"
Message-ID:  <5D54B918-22AE-4395-82D2-569678C01835@yahoo.com>

next in thread | raw e-mail | index | archive | help
The below is from a ports-mgmt/poudriere-devel run under FreeBSD head
-r344825 on an old PowerMac G5 (2 sockets, 2 cores each, powerpc64).
The /usr/ports is from head -r494751 . buildworld buildkernel
was via devel/powerpc64-xtoolchain-gcc materials and system-clang
(8.0.0) was built (and installed as cc/c++) as part of that.
/usr/ports/base/binutils was used to supply the system binutils,
including ld. (Running the PowerPC G5 for this context does require
some hacks in /usr/src/ currently.)

Being a poudriere-devel run, the /tmp/nir_constant_expressions-be5a21.*
are not available (not recorded  in the tar of the failure). (Too
bad there is a mismatch betting poudriere's capture and where such
files are placed.)

But I do have a gdb based backtrace from the:

work/mesa-18.3.2/src/compiler/cc.15701.core

The assert was the one in:

  case ISD::FTRUNC: {
    // We're going to widen this vector op to a legal type by padding =
with undef
    // elements. If the wide vector op is eventually going to be =
expanded to
    // scalar libcalls, then unroll into scalar ops now to avoid =
unnecessary
    // libcalls on the undef elements. We are assuming that if the =
scalar op
    // requires expanding, then the vector op needs expanding too.
    EVT VT =3D N->getValueType(0);
    if (TLI.isOperationExpand(N->getOpcode(), VT.getScalarType())) {
      EVT WideVecVT =3D TLI.getTypeToTransformTo(*DAG.getContext(), VT);
      assert(!TLI.isOperationLegalOrCustom(N->getOpcode(), WideVecVT) &&
             "Target supports vector op, but scalar requires =
expansion?");
      Res =3D DAG.UnrollVectorOp(N, WideVecVT.getVectorNumElements());
      break;
    }


(gdb) info threads
  Id   Target Id         Frame=20
* 1    LWP 100119        0x00000000137251e8 in .__sys_thr_kill () at =
thr_kill.S:3
(gdb) bt
#0  0x00000000137251e8 in .__sys_thr_kill () at thr_kill.S:3
#1  0x00000000137247bc in __raise (s=3D<optimized out>) at =
/usr/src/lib/libc/gen/raise.c:52
#2  0x00000000136e6410 in abort () at =
/usr/src/lib/libc/stdlib/abort.c:79
#3  0x0000000013712fd8 in __assert (func=3D<optimized out>, =
file=3D<optimized out>, line=3D<optimized out>, failedexpr=3D<optimized =
out>) at /usr/src/lib/libc/gen/assert.c:51
#4  0x000000001351f20c in llvm::DAGTypeLegalizer::WidenVectorResult () =
at =
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:253=
1
#5  0x0000000012f1d7d8 in llvm::DAGTypeLegalizer::run () at =
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:281
#6  0x0000000012f1eab4 in llvm::SelectionDAG::LegalizeTypes () at =
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1115
#7  0x0000000012db9e50 in llvm::SelectionDAGISel::CodeGenAndEmitDAG () =
at =
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:776
#8  0x0000000012dbf934 in llvm::SelectionDAGISel::SelectAllBasicBlocks =
() at =
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1784
#9  0x0000000012dc2668 in llvm::SelectionDAGISel::runOnMachineFunction =
() at =
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:471
#10 0x00000000120edfc8 in runOnMachineFunction () at =
/usr/src/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:155
#11 0x00000000130514b4 in llvm::MachineFunctionPass::runOnFunction () at =
/usr/src/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp:74
#12 0x000000001296d640 in llvm::FPPassManager::runOnFunction () at =
/usr/src/contrib/llvm/lib/IR/LegacyPassManager.cpp:1644
#13 0x000000001296d908 in llvm::FPPassManager::runOnModule () at =
/usr/src/contrib/llvm/lib/IR/LegacyPassManager.cpp:1679
#14 0x000000001296e780 in runOnModule () at =
/usr/src/contrib/llvm/lib/IR/LegacyPassManager.cpp:1744
#15 llvm::legacy::PassManagerImpl::run () at =
/usr/src/contrib/llvm/lib/IR/LegacyPassManager.cpp:1857
#16 0x0000000010bbac7c in EmitAssembly () at =
/usr/src/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:882
#17 0x0000000010bbc9a8 in clang::EmitBackendOutput () at =
/usr/src/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1318
#18 0x00000000103cd0b0 in clang::BackendConsumer::HandleTranslationUnit =
() at =
/usr/src/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:295
#19 0x0000000010821d40 in clang::ParseAST () at =
/usr/src/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp:170
#20 0x000000001080d528 in clang::ASTFrontendAction::ExecuteAction () at =
/usr/src/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1037
#21 0x00000000103cc108 in clang::CodeGenAction::ExecuteAction () at =
/usr/src/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1048
#22 0x0000000010811eb0 in clang::FrontendAction::Execute () at =
/usr/src/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:935
#23 0x00000000111b1960 in clang::CompilerInstance::ExecuteAction () at =
/usr/src/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:955
#24 0x00000000103b602c in clang::ExecuteCompilerInvocation () at =
/usr/src/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocati=
on.cpp:268
#25 0x00000000103a47c8 in cc1_main () at =
/usr/src/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp:219
#26 0x0000000010346908 in ExecuteCC1Tool () at =
/usr/src/contrib/llvm/tools/clang/tools/driver/driver.cpp:310
#27 main () at =
/usr/src/contrib/llvm/tools/clang/tools/driver/driver.cpp:382


For reference:

libtool: compile:  c++ -DPACKAGE_NAME=3D\"Mesa\" =
-DPACKAGE_TARNAME=3D\"mesa\" -DPACKAGE_VERSION=3D\"18.3.2\" =
"-DPACKAGE_STRING=3D\"Mesa 18.3.2\"" =
"-DPACKAGE_BUGREPORT=3D\"https://bugs.freedesktop.org/enter_bug.cgi?produc=
t=3DMesa\"" -DPACKAGE_URL=3D\"\" -DPACKAGE=3D\"mesa\" =
-DVERSION=3D\"18.3.2\" -DSTDC_HEADERS=3D1 -DHAVE_SYS_TYPES_H=3D1 =
-DHAVE_SYS_STAT_H=3D1 -DHAVE_STDLIB_H=3D1 -DHAVE_STRING_H=3D1 =
-DHAVE_MEMORY_H=3D1 -DHAVE_STRINGS_H=3D1 -DHAVE_INTTYPES_H=3D1 =
-DHAVE_STDINT_H=3D1 -DHAVE_UNISTD_H=3D1 -DHAVE_DLFCN_H=3D1 =
-DLT_OBJDIR=3D\".libs/\" -DYYTEXT_POINTER=3D1 -DHAVE___BUILTIN_BSWAP32=3D1=
 -DHAVE___BUILTIN_BSWAP64=3D1 -DHAVE___BUILTIN_CLZ=3D1 =
-DHAVE___BUILTIN_CLZLL=3D1 -DHAVE___BUILTIN_CTZ=3D1 =
-DHAVE___BUILTIN_EXPECT=3D1 -DHAVE___BUILTIN_FFS=3D1 =
-DHAVE___BUILTIN_FFSLL=3D1 -DHAVE___BUILTIN_POPCOUNT=3D1 =
-DHAVE___BUILTIN_POPCOUNTLL=3D1 -DHAVE___BUILTIN_UNREACHABLE=3D1 =
-DHAVE_FUNC_ATTRIBUTE_CONST=3D1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=3D1 =
-DHAVE_FUNC_ATTRIBUTE_FORMAT=3D1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=3D1 =
-DHAVE_FUNC_ATTRIBUTE_PACKED=3D1 -DHAVE_FUNC_ATTRIBUTE_PURE=3D1 =
-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=3D1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=3D1=
 -DHAVE_FUNC_ATTRIBUTE_VISIBILITY=3D1 =
-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=3D1 =
-DHAVE_FUNC_ATTRIBUTE_WEAK=3D1 -DHAVE_FUNC_ATTRIBUTE_ALIAS=3D1 =
-DHAVE_FUNC_ATTRIBUTE_NORETURN=3D1 -DHAVE_DLADDR=3D1 =
-DHAVE_CLOCK_GETTIME=3D1 -DHAVE_CLOCK_NANOSLEEP=3D1 =
-DHAVE_PTHREAD_PRIO_INHERIT=3D1 -DHAVE_PTHREAD=3D1 -DHAVE_SYS_UMTX_H=3D1 =
-DENABLE_ST_OMX_BELLAGIO=3D0 -DENABLE_ST_OMX_TIZONIA=3D0 -I. =
-I../../include -I../../src -I../../src/mapi -I../../src/mesa/ =
-I../../src/compiler/glsl -I../../src/compiler/glsl =
-I../../src/compiler/glsl/glcpp -I../../src/compiler/nir =
-I../../src/compiler/nir -I../../src/compiler/spirv =
-I../../src/gallium/include -I../../src/gallium/auxiliary =
-I../../src/gtest/include -D__STDC_CONSTANT_MACROS =
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DUSE_GCC_ATOMIC_BUILTINS =
-DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_DLFCN_H =
-DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_STRTOD_L =
-DHAVE_DL_ITERATE_PHDR -DHAVE_POSIX_MEMALIGN -DHAVE_ZLIB =
-DHAVE_PTHREAD_SETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_LIBDRM =
-DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING =
-DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM =
-DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 =
-DHAVE_DRI3_MODIFIERS -DENABLE_SHADER_CACHE -DHAVE_MINCORE =
-DHAVE_LLVM=3D0x0600 -DMESA_LLVM_VERSION_PATCH=3D1 -isystem =
/usr/local/include -fvisibility=3Dhidden -Werror=3Dpointer-arith =
-Werror=3Dvla -O2 -pipe -g -isystem /usr/local/include =
-fno-strict-aliasing -isystem /usr/local/include -Wall -fno-math-errno =
-fno-trapping-math -Wno-missing-field-initializers -Qunused-arguments =
-MT glsl/ir_builder.lo -MD -MP -MF glsl/.deps/ir_builder.Tpo -c =
glsl/ir_builder.cpp  -fPIC -DPIC -o glsl/.libs/ir_builder.o
libtool: compile:  c++ -DPACKAGE_NAME=3D\"Mesa\" =
-DPACKAGE_TARNAME=3D\"mesa\" -DPACKAGE_VERSION=3D\"18.3.2\" =
"-DPACKAGE_STRING=3D\"Mesa 18.3.2\"" =
"-DPACKAGE_BUGREPORT=3D\"https://bugs.freedesktop.org/enter_bug.cgi?produc=
t=3DMesa\"" -DPACKAGE_URL=3D\"\" -DPACKAGE=3D\"mesa\" =
-DVERSION=3D\"18.3.2\" -DSTDC_HEADERS=3D1 -DHAVE_SYS_TYPES_H=3D1 =
-DHAVE_SYS_STAT_H=3D1 -DHAVE_STDLIB_H=3D1 -DHAVE_STRING_H=3D1 =
-DHAVE_MEMORY_H=3D1 -DHAVE_STRINGS_H=3D1 -DHAVE_INTTYPES_H=3D1 =
-DHAVE_STDINT_H=3D1 -DHAVE_UNISTD_H=3D1 -DHAVE_DLFCN_H=3D1 =
-DLT_OBJDIR=3D\".libs/\" -DYYTEXT_POINTER=3D1 -DHAVE___BUILTIN_BSWAP32=3D1=
 -DHAVE___BUILTIN_BSWAP64=3D1 -DHAVE___BUILTIN_CLZ=3D1 =
-DHAVE___BUILTIN_CLZLL=3D1 -DHAVE___BUILTIN_CTZ=3D1 =
-DHAVE___BUILTIN_EXPECT=3D1 -DHAVE___BUILTIN_FFS=3D1 =
-DHAVE___BUILTIN_FFSLL=3D1 -DHAVE___BUILTIN_POPCOUNT=3D1 =
-DHAVE___BUILTIN_POPCOUNTLL=3D1 -DHAVE___BUILTIN_UNREACHABLE=3D1 =
-DHAVE_FUNC_ATTRIBUTE_CONST=3D1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=3D1 =
-DHAVE_FUNC_ATTRIBUTE_FORMAT=3D1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=3D1 =
-DHAVE_FUNC_ATTRIBUTE_PACKED=3D1 -DHAVE_FUNC_ATTRIBUTE_PURE=3D1 =
-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=3D1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=3D1=
 -DHAVE_FUNC_ATTRIBUTE_VISIBILITY=3D1 =
-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=3D1 =
-DHAVE_FUNC_ATTRIBUTE_WEAK=3D1 -DHAVE_FUNC_ATTRIBUTE_ALIAS=3D1 =
-DHAVE_FUNC_ATTRIBUTE_NORETURN=3D1 -DHAVE_DLADDR=3D1 =
-DHAVE_CLOCK_GETTIME=3D1 -DHAVE_CLOCK_NANOSLEEP=3D1 =
-DHAVE_PTHREAD_PRIO_INHERIT=3D1 -DHAVE_PTHREAD=3D1 -DHAVE_SYS_UMTX_H=3D1 =
-DENABLE_ST_OMX_BELLAGIO=3D0 -DENABLE_ST_OMX_TIZONIA=3D0 -I. =
-I../../include -I../../src -I../../src/mapi -I../../src/mesa/ =
-I../../src/compiler/glsl -I../../src/compiler/glsl =
-I../../src/compiler/glsl/glcpp -I../../src/compiler/nir =
-I../../src/compiler/nir -I../../src/compiler/spirv =
-I../../src/gallium/include -I../../src/gallium/auxiliary =
-I../../src/gtest/include -D__STDC_CONSTANT_MACROS =
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DUSE_GCC_ATOMIC_BUILTINS =
-DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_DLFCN_H =
-DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_STRTOD_L =
-DHAVE_DL_ITERATE_PHDR -DHAVE_POSIX_MEMALIGN -DHAVE_ZLIB =
-DHAVE_PTHREAD_SETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_LIBDRM =
-DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING =
-DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM =
-DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 =
-DHAVE_DRI3_MODIFIERS -DENABLE_SHADER_CACHE -DHAVE_MINCORE =
-DHAVE_LLVM=3D0x0600 -DMESA_LLVM_VERSION_PATCH=3D1 -isystem =
/usr/local/include -fvisibility=3Dhidden -Werror=3Dpointer-arith =
-Werror=3Dvla -O2 -pipe -g -isystem /usr/local/include =
-fno-strict-aliasing -isystem /usr/local/include -Wall -fno-math-errno =
-fno-trapping-math -Wno-missing-field-initializers -Qunused-arguments =
-MT glsl/ir_clone.lo -MD -MP -MF glsl/.deps/ir_clone.Tpo -c =
glsl/ir_clone.cpp  -fPIC -DPIC -o glsl/.libs/ir_clone.o
cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see =
invocation)
FreeBSD clang version 8.0.0 (branches/release_80 355313) (based on LLVM =
8.0.0)
Target: powerpc64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin
cc: note: diagnostic msg: PLEASE submit a bug report to =
https://bugs.freebsd.org/submit/ and include the crash backtrace, =
preprocessed source, and associated run script.
cc: note: diagnostic msg:=20
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/nir_constant_expressions-be5a21.c
cc: note: diagnostic msg: /tmp/nir_constant_expressions-be5a21.sh
cc: note: diagnostic msg:=20



=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5D54B918-22AE-4395-82D2-569678C01835>