[llvm-bugs] [Bug 47664] New: LLVM ERROR: unsupported libcall legalization in clang-11

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 28 01:26:13 PDT 2020


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

            Bug ID: 47664
           Summary: LLVM ERROR: unsupported libcall legalization in
                    clang-11
           Product: clang
           Version: 11.0
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: marcus.wagner at hpe.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, marcus.wagner at hpe.com,
                    richard-llvm at metafoo.co.uk

```
Please, note that this bug categorization is the best I could come up with.
If this should not be submitted under "clang", please, re-classify as needed.

During a debug build with optimization level -O0 of a test case of
the AMReX software framework using the software environment modules
    (gcc/9.2.0, mpich/ge/gcc/64/3.3.2, rocm/3.7.0)
an "LLVM ERROR: unsupported libcall legalization" occurred, which
resulted in a core dump and in the crash backtrace shown below.
This error did not occur when the optimization level was changed
from -O0 to -O3, where the latter case worked.
Also, when rocm/3.7.0 was swapped out for rocm/3.8.0,
this compiler error no longer resulted in a crash and a core dump.
Instead, the error message was then
    fatal error: error in backend: unsupported libcall legalization
    clang-11: error: clang frontend command failed with exit code 70 (use -v to
see invocation)

Here is the signature of the more severe form of presumably the
same compiler error:

LLVM ERROR: unsupported libcall legalization
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: /opt/rocm-3.7.0/llvm/bin/llc
/tmp/CNS_advance-1a7add-gfx906-optimized-caf2ef.bc -O0
-mtriple=amdgcn-amd-amdhsa -mcpu=gfx906 -filetype=obj -o
/tmp/CNS_advance-1a7add-gfx906-2df49d.o
1.      Running pass 'CallGraph Pass Manager' on module
'/tmp/CNS_advance-1a7add-gfx906-optimized-caf2ef.bc'.
2.      Running pass 'AMDGPU DAG->DAG Pattern Instruction Selection' on
function '@_Z11cns_ctoprimiiiRKN5amrex6Array4IKdEERKNS0_IdEERK4Parm'
 #0 0x00000000019c929a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/opt/rocm-3.7.0/llvm/bin/llc+0x19c929a)
 #1 0x00000000019c70a4 llvm::sys::RunSignalHandlers()
(/opt/rocm-3.7.0/llvm/bin/llc+0x19c70a4)
 #2 0x00000000019c71e3 SignalHandler(int)
(/opt/rocm-3.7.0/llvm/bin/llc+0x19c71e3)
 #3 0x000015555511ddd0 __restore_rt (/lib64/libpthread.so.0+0x12dd0)
 #4 0x0000155553bb670f raise (/lib64/libc.so.6+0x3770f)
 #5 0x0000155553ba0b25 abort (/lib64/libc.so.6+0x21b25)
 #6 0x000000000194c248 llvm::report_fatal_error(llvm::Twine const&, bool)
(/opt/rocm-3.7.0/llvm/bin/llc+0x194c248)
 #7 0x000000000194c368 (/opt/rocm-3.7.0/llvm/bin/llc+0x194c368)
 #8 0x00000000008239c6 (/opt/rocm-3.7.0/llvm/bin/llc+0x8239c6)
 #9 0x00000000017bd8bd
llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&)
const (/opt/rocm-3.7.0/llvm/bin/llc+0x17bd8bd)
#10 0x0000000001882097 llvm::TargetLowering::makeLibCall(llvm::SelectionDAG&,
llvm::RTLIB::Libcall, llvm::EVT, llvm::ArrayRef<llvm::SDValue>,
llvm::TargetLowering::MakeLibCallOptions, llvm::SDLoc const&, llvm::SDValue)
const (/opt/rocm-3.7.0/llvm/bin/llc+0x1882097)
#11 0x0000000001883b95 llvm::TargetLowering::expandMULO(llvm::SDNode*,
llvm::SDValue&, llvm::SDValue&, llvm::SelectionDAG&) const
(/opt/rocm-3.7.0/llvm/bin/llc+0x1883b95)
#12 0x000000000178a874 (anonymous
namespace)::SelectionDAGLegalize::ExpandNode(llvm::SDNode*)
(/opt/rocm-3.7.0/llvm/bin/llc+0x178a874)
#13 0x000000000177fecb (anonymous
namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*)
(/opt/rocm-3.7.0/llvm/bin/llc+0x177fecb)
#14 0x00000000017844df llvm::SelectionDAG::Legalize()
(/opt/rocm-3.7.0/llvm/bin/llc+0x17844df)
#15 0x0000000001840878 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/opt/rocm-3.7.0/llvm/bin/llc+0x1840878)
#16 0x0000000001844adc
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/opt/rocm-3.7.0/llvm/bin/llc+0x1844adc)
#17 0x0000000001846c4a
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.803) (/opt/rocm-3.7.0/llvm/bin/llc+0x1846c4a)
#18 0x00000000008cf63a (anonymous
namespace)::AMDGPUDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/opt/rocm-3.7.0/llvm/bin/llc+0x8cf63a)
#19 0x0000000000fb7368
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/opt/rocm-3.7.0/llvm/bin/llc+0xfb7368)
#20 0x0000000001340db7 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/opt/rocm-3.7.0/llvm/bin/llc+0x1340db7)
#21 0x0000000000c4a118 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/opt/rocm-3.7.0/llvm/bin/llc+0xc4a118)
#22 0x0000000001341941 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/opt/rocm-3.7.0/llvm/bin/llc+0x1341941)
#23 0x00000000006cb15d compileModule(char**, llvm::LLVMContext&)
(/opt/rocm-3.7.0/llvm/bin/llc+0x6cb15d)
#24 0x000000000065e835 main (/opt/rocm-3.7.0/llvm/bin/llc+0x65e835)
#25 0x0000155553ba26a3 __libc_start_main (/lib64/libc.so.6+0x236a3)
#26 0x00000000006c4c0e _start (/opt/rocm-3.7.0/llvm/bin/llc+0x6c4c0e)
clang-11: error: unable to execute command: Aborted (core dumped)
clang-11: error: amdgcn-link command failed due to signal (use -v to see
invocation)
clang version 11.0.0
(/data/jenkins_workspace/centos_pipeline_job_8.1_rel-3.7/rocm-rel-3.7/rocm-3.7-20-20200817/8.1/external/llvm-project/clang
ee4e4ebbadcc8ea14ce99e34ed31ab31e94827ac)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm-3.7.0/llvm/bin
clang-11: note: diagnostic msg: Error generating preprocessed source(s).

-- 
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/20200928/021bd7b0/attachment.html>


More information about the llvm-bugs mailing list