[llvm-bugs] [Bug 29139] New: AllocaSliceRewriter::visit(llvm::sroa::AllocaSlices::const_iterator): Assertion `CanSROA' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 25 09:39:36 PDT 2016


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

            Bug ID: 29139
           Summary: AllocaSliceRewriter::visit(llvm::sroa::AllocaSlices::c
                    onst_iterator): Assertion `CanSROA' failed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: wenzel.jakob at epfl.ch
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Hi,

clang trunk crashes with an assertion error when compiling the attached AVX512
code. In this case, I am not sure if the AVX512 backend is to blame though.
(looks like an optimization pass that happens earlier)

clang-4.0: /home/osboxes/Code/llvm/lib/Transforms/Scalar/SROA.cpp:2254: bool
llvm::sroa::AllocaSliceRewriter::visit(llvm::sroa::AllocaSlices::const_iterator):
Assertion `CanSROA' failed.
#0 0x00000000032bf737 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x32bf737)
#1 0x00000000032bfad6 PrintStackTraceSignalHandler(void*)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x32bfad6)
#2 0x00000000032bdaa8 llvm::sys::RunSignalHandlers()
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x32bdaa8)
#3 0x00000000032beec3 SignalHandler(int)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x32beec3)
#4 0x00007f2cca5603d0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x113d0)
#5 0x00007f2cc9716418 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35418)
#6 0x00007f2cc971801a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3701a)
#7 0x00007f2cc970ebd7 (/lib/x86_64-linux-gnu/libc.so.6+0x2dbd7)
#8 0x00007f2cc970ec82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#9 0x00000000031b60eb llvm::sroa::AllocaSliceRewriter::visit((anonymous
namespace)::Slice const*)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x31b60eb)
#10 0x00000000031bf34d llvm::SROA::rewritePartition(llvm::AllocaInst&,
llvm::sroa::AllocaSlices&, llvm::sroa::Partition&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x31bf34d)
#11 0x00000000031bfb6d llvm::SROA::splitAlloca(llvm::AllocaInst&,
llvm::sroa::AllocaSlices&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x31bfb6d)
#12 0x00000000031c063c llvm::SROA::runOnAlloca(llvm::AllocaInst&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x31c063c)
#13 0x00000000031c0d80 llvm::SROA::runImpl(llvm::Function&,
llvm::DominatorTree&, llvm::AssumptionCache&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x31c0d80)
#14 0x00000000031c1199
llvm::sroa::SROALegacyPass::runOnFunction(llvm::Function&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x31c1199)
#15 0x0000000002d534a8 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x2d534a8)
#16 0x000000000415af29 (anonymous
namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&,
llvm::CallGraph&, bool&, bool&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x415af29)
#17 0x000000000415c0a7 (anonymous
namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&,
llvm::CallGraph&, bool&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x415c0a7)
#18 0x000000000415c3e5 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x415c3e5)
#19 0x0000000002d539bc (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x2d539bc)
#20 0x0000000002d540ed llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x2d540ed)
#21 0x0000000002d542f9 llvm::legacy::PassManager::run(llvm::Module&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x2d542f9)
#22 0x000000000354b48f (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x354b48f)
#23 0x000000000354c219 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x354c219)
#24 0x0000000003f355eb
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x3f355eb)
#25 0x0000000004a45300 clang::ParseAST(clang::Sema&, bool, bool)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x4a45300)
#26 0x0000000003ad4575 clang::ASTFrontendAction::ExecuteAction()
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x3ad4575)
#27 0x0000000003f38910 clang::CodeGenAction::ExecuteAction()
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x3f38910)
#28 0x0000000003ad3fe2 clang::FrontendAction::Execute()
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x3ad3fe2)
#29 0x0000000003a83e59
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x3a83e59)
#30 0x0000000003c01c0b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x3c01c0b)
#31 0x000000000183a6aa cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/osboxes/Code/llvm/build/bin/clang-4.0+0x183a6aa)
#32 0x0000000001830a72 ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef) (/home/osboxes/Code/llvm/build/bin/clang-4.0+0x1830a72)
#33 0x00000000018316fd main
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x18316fd)
#34 0x00007f2cc9701830 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x20830)
#35 0x000000000182c9b9 _start
(/home/osboxes/Code/llvm/build/bin/clang-4.0+0x182c9b9)
Stack dump:
0.    Program arguments: /home/osboxes/Code/llvm/build/bin/clang-4.0 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
testsuite.cpp -mrelocation-model static -mthread-model posix -fmath-errno
-ffp-contract=fast -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu skx -momit-leaf-frame-pointer -dwarf-column-info
-debugger-tuning=gdb -coverage-file
/home/osboxes/Code/simdarray/build/CMakeFiles/testsuite_avx512_xeon.dir/tests/testsuite.cpp.o
-resource-dir /home/osboxes/Code/llvm/build/bin/../lib/clang/4.0.0 -I
/home/osboxes/Code/simdarray/include -D NDEBUG -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward
-internal-isystem /usr/local/include -internal-isystem
/home/osboxes/Code/llvm/build/bin/../lib/clang/4.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-Wall -Wextra -Wconversion -std=c++14 -fdeprecated-macro
-fdebug-compilation-dir /home/osboxes/Code/simdarray/build -ferror-limit 19
-fmessage-length 156 -fvisibility hidden -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o
CMakeFiles/testsuite_avx512_xeon.dir/tests/testsuite.cpp.o -x c++
/home/osboxes/Code/simdarray/tests/testsuite.cpp 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module
'/home/osboxes/Code/simdarray/tests/testsuite.cpp'.
4.    Running pass 'SROA' on function
'@_ZN4simd9ArrayBaseIfLm31ELb0ELNS_12RoundingModeE4ENS_5ArrayIfLm31ELb0ELS1_4EEEvEC2IJfffffffffffffffffffffffffffffffELi0EEEDpT_'
clang-4.0: error: unable to execute command: Aborted (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 279528)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/osboxes/Code/llvm/build/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-4.0: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-4.0: note: diagnostic msg: /tmp/testsuite-6d6400.cpp
clang-4.0: note: diagnostic msg: /tmp/testsuite-6d6400.sh
clang-4.0: 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/20160825/1926466e/attachment-0001.html>


More information about the llvm-bugs mailing list