[llvm-bugs] [Bug 50907] New: ICE: Assertion `PartVT.getFixedSizeInBits() > ValueSize && "lossy conversion of vector to scalar type"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 26 21:54:40 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50907

            Bug ID: 50907
           Summary: ICE: Assertion `PartVT.getFixedSizeInBits() >
                    ValueSize && "lossy conversion of vector to scalar
                    type"' failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: cnsun at uwaterloo.ca
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

$ clang-trunk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
2e9c75daffddd65e37c3236708b5b133e6f5f2f5)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$ cat mutant.c
typedef short v8hi __attribute__((vector_size(16)));
f2() {
  v8hi d;
  asm("" : : "r"(d));
}

$ clang-trunk  mutant.c
mutant.c:2:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
f2() {
^
mutant.c:5:1: warning: non-void function does not return a value
[-Wreturn-type]
}
^
clang-13:
/tmp/tmp.xjN6dMkdrg-clang-builder/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:679:
void getCopyToPartsVector(llvm::SelectionDAG&, const llvm::SDLoc&,
llvm::SDValue, llvm::SDValue*, unsigned int, llvm::MVT, const llvm::Value*,
llvm::Optional<unsigned int>): Assertion `PartVT.getFixedSizeInBits() >
ValueSize && "lossy conversion of vector to scalar type"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /scratch/software/clang-trunk/bin/clang-13 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -main-file-name mutant.c -mrelocation-model static
-mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb
-fcoverage-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/default_c_finding_folder/crash_20210627_043253_0faa/delta/perses_result
-resource-dir /scratch/software/clang-trunk/lib/clang/13.0.0 -c-isystem .
-c-isystem /usr/local/include/cmsith -internal-isystem
/scratch/software/clang-trunk/lib/clang/13.0.0/include -internal-isystem
/usr/local/include -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/default_c_finding_folder/crash_20210627_043253_0faa/delta/perses_result
-ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1
-o /tmp/mutant-30be97.o -x c mutant.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'mutant.c'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@f2'
 #0 0x0000558ef2518184 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x0000558ef251593e SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f66afdc03c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #3 0x00007f66af85f18b raise
/build/glibc-ZN95T4/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #4 0x00007f66af83e859 abort /build/glibc-ZN95T4/glibc-2.31/stdlib/abort.c:81:7
 #5 0x00007f66af83e729 get_sysdep_segment_value
/build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:509:8
 #6 0x00007f66af83e729 _nl_load_domain
/build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:970:34
 #7 0x00007f66af84ff36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
 #8 0x0000558ef34819f7 getCopyToParts(llvm::SelectionDAG&, llvm::SDLoc const&,
llvm::SDValue, llvm::SDValue*, unsigned int, llvm::MVT, llvm::Value const*,
llvm::Optional<unsigned int>, llvm::ISD::NodeType) SelectionDAGBuilder.cpp:0:0
 #9 0x0000558ef348622a llvm::RegsForValue::getCopyToRegs(llvm::SDValue,
llvm::SelectionDAG&, llvm::SDLoc const&, llvm::SDValue&, llvm::SDValue*,
llvm::Value const*, llvm::ISD::NodeType) const
(/scratch/software/clang-trunk/bin/clang-13+0x48c922a)
#10 0x0000558ef34b47e1 llvm::SelectionDAGBuilder::visitInlineAsm(llvm::CallBase
const&, llvm::BasicBlock const*)
(/scratch/software/clang-trunk/bin/clang-13+0x48f77e1)
#11 0x0000558ef34a717a llvm::SelectionDAGBuilder::visitCall(llvm::CallInst
const&) (/scratch/software/clang-trunk/bin/clang-13+0x48ea17a)
#12 0x0000558ef34d495d llvm::SelectionDAGBuilder::visit(llvm::Instruction
const&) (/scratch/software/clang-trunk/bin/clang-13+0x491795d)
#13 0x0000558ef3540680
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, true>, bool&)
(/scratch/software/clang-trunk/bin/clang-13+0x4983680)
#14 0x0000558ef35422d4
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/scratch/software/clang-trunk/bin/clang-13+0x49852d4)
#15 0x0000558ef354356b
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0)
SelectionDAGISel.cpp:0:0
#16 0x0000558ef1011bfc (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
X86ISelDAGToDAG.cpp:0:0
#17 0x0000558ef1735c68
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/scratch/software/clang-trunk/bin/clang-13+0x2b78c68)
#18 0x0000558ef1c0ed05 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/scratch/software/clang-trunk/bin/clang-13+0x3051d05)
#19 0x0000558ef1c0ef49 llvm::FPPassManager::runOnModule(llvm::Module&)
(/scratch/software/clang-trunk/bin/clang-13+0x3051f49)
#20 0x0000558ef1c10042 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/scratch/software/clang-trunk/bin/clang-13+0x3053042)
#21 0x0000558ef284ae72 (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >) BackendUtil.cpp:0:0
#22 0x0000558ef284c92d clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef,
llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/scratch/software/clang-trunk/bin/clang-13+0x3c8f92d)
#23 0x0000558ef3675e1f
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/scratch/software/clang-trunk/bin/clang-13+0x4ab8e1f)
#24 0x0000558ef472d4d9 clang::ParseAST(clang::Sema&, bool, bool)
(/scratch/software/clang-trunk/bin/clang-13+0x5b704d9)
#25 0x0000558ef3674968 clang::CodeGenAction::ExecuteAction()
(/scratch/software/clang-trunk/bin/clang-13+0x4ab7968)
#26 0x0000558ef2f24599 clang::FrontendAction::Execute()
(/scratch/software/clang-trunk/bin/clang-13+0x4367599)
#27 0x0000558ef2eb77e6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/scratch/software/clang-trunk/bin/clang-13+0x42fa7e6)
#28 0x0000558ef3002480
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/scratch/software/clang-trunk/bin/clang-13+0x4445480)
#29 0x0000558eefe22696 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/scratch/software/clang-trunk/bin/clang-13+0x1265696)
#30 0x0000558eefe1e9d8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
driver.cpp:0:0
#31 0x0000558eefd4c0e6 main
(/scratch/software/clang-trunk/bin/clang-13+0x118f0e6)
#32 0x00007f66af8400b3 __libc_start_main
/build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:342:3
#33 0x0000558eefe1e54e _start
(/scratch/software/clang-trunk/bin/clang-13+0x126154e)
clang-13: error: unable to execute command: Aborted (core dumped)
clang-13: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
2e9c75daffddd65e37c3236708b5b133e6f5f2f5)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
clang-13: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg: /tmp/mutant-c05f31.c
clang-13: note: diagnostic msg: /tmp/mutant-c05f31.sh
clang-13: note: diagnostic msg:

********************

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210627/870cb854/attachment.html>


More information about the llvm-bugs mailing list