[llvm-bugs] [Bug 47319] New: ICE on x86_64-linux-gnu with `-mllvm -polly -O3` ({anonymous}::ForwardOpTreeImpl::tryForwardTree(polly::MemoryAccess*): Assertion `RA->isLatestScalarKind()')

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 26 09:01:57 PDT 2020


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

            Bug ID: 47319
           Summary: ICE on x86_64-linux-gnu with `-mllvm -polly -O3`
                    ({anonymous}::ForwardOpTreeImpl::tryForwardTree(polly:
                    :MemoryAccess*): Assertion `RA->isLatestScalarKind()')
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Optimizer
          Assignee: polly-dev at googlegroups.com
          Reporter: cnsun at uwaterloo.ca
                CC: llvm-bugs at lists.llvm.org

$ clang-trunk -mllvm -polly -O3 t.c 
clang-12:
/tmp/tmp.kYDlRalzKH-clang-builder/llvm-project/polly/lib/Transform/ForwardOpTree.cpp:798:
bool {anonymous}::ForwardOpTreeImpl::tryForwardTree(polly::MemoryAccess*):
Assertion `RA->isLatestScalarKind()' 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-12 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free
-main-file-name t.c -mrelocation-model static -mframe-pointer=none -fmath-errno
-fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64
-fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir
/scratch/software/clang-trunk/lib/clang/12.0.0 -internal-isystem
/usr/local/include -internal-isystem
/scratch/software/clang-trunk/lib/clang/12.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-fdebug-compilation-dir
/scratch/cnsun/data/compiler_testing/emi_hermes/20200825-clang-trunk-m32-Weverything-flto=full-mllvm-polly-g-O3-build-202721/delta
-ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops
-vectorize-slp -mllvm -polly -faddrsig -o /tmp/t-0225d6.o -x c t.c 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 't.c'.
4.      Running pass 'Region Pass Manager' on function '@main'
5.      Running pass 'Polly - Forward operand tree' on basic block '%cond.end'
 #0 0x00005639add15f5e llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/scratch/software/clang-trunk/bin/clang-12+0x32a4f5e)
 #1 0x00005639add13cd4 llvm::sys::RunSignalHandlers()
(/scratch/software/clang-trunk/bin/clang-12+0x32a2cd4)
 #2 0x00005639add13e18 SignalHandler(int)
(/scratch/software/clang-trunk/bin/clang-12+0x32a2e18)
 #3 0x00007ff91dc583c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #4 0x00007ff91d6f818b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4618b)
 #5 0x00007ff91d6d7859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x25859)
 #6 0x00007ff91d6d7729 (/lib/x86_64-linux-gnu/libc.so.6+0x25729)
 #7 0x00007ff91d6e8f36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
 #8 0x00005639aed72bb4 (anonymous
namespace)::ForwardOpTree::runOnScop(polly::Scop&)
(/scratch/software/clang-trunk/bin/clang-12+0x4301bb4)
 #9 0x00005639ace86c70 llvm::RGPassManager::runOnFunction(llvm::Function&)
(/scratch/software/clang-trunk/bin/clang-12+0x2415c70)
#10 0x00005639ad560391 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/scratch/software/clang-trunk/bin/clang-12+0x2aef391)
#11 0x00005639ad560a89 llvm::FPPassManager::runOnModule(llvm::Module&)
(/scratch/software/clang-trunk/bin/clang-12+0x2aefa89)
#12 0x00005639ad55f52c llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/scratch/software/clang-trunk/bin/clang-12+0x2aee52c)
#13 0x00005639adfdf439 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/scratch/software/clang-trunk/bin/clang-12+0x356e439)
#14 0x00005639adfe0f25 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, 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> >)
(/scratch/software/clang-trunk/bin/clang-12+0x356ff25)
#15 0x00005639aecf0ad1
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/scratch/software/clang-trunk/bin/clang-12+0x427fad1)
#16 0x00005639afd6fc79 clang::ParseAST(clang::Sema&, bool, bool)
(/scratch/software/clang-trunk/bin/clang-12+0x52fec79)
#17 0x00005639aecef518 clang::CodeGenAction::ExecuteAction()
(/scratch/software/clang-trunk/bin/clang-12+0x427e518)
#18 0x00005639ae617799 clang::FrontendAction::Execute()
(/scratch/software/clang-trunk/bin/clang-12+0x3ba6799)
#19 0x00005639ae5cde56
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/scratch/software/clang-trunk/bin/clang-12+0x3b5ce56)
#20 0x00005639ae6eb7a0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/scratch/software/clang-trunk/bin/clang-12+0x3c7a7a0)
#21 0x00005639aba08b9c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/scratch/software/clang-trunk/bin/clang-12+0xf97b9c)
#22 0x00005639aba05cd8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/scratch/software/clang-trunk/bin/clang-12+0xf94cd8)
#23 0x00005639ab94e27e main
(/scratch/software/clang-trunk/bin/clang-12+0xedd27e)
#24 0x00007ff91d6d90b3 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#25 0x00005639aba0582e _start
(/scratch/software/clang-trunk/bin/clang-12+0xf9482e)
clang-12: error: unable to execute command: Aborted (core dumped)
clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 12.0.0 (https://github.com/llvm/llvm-project.git
8839e278ffcadc62b333423de07756488cae980f)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
clang-12: note: diagnostic msg: 
********************

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

********************
$ 
$ cat t.c 
int a, b, c, d, e;
char f;
short g;
short h(short i, short j) { return j == 0 ? i : i % j; }
unsigned short k(short i, short j) { return i + j; }
int main() {
  short m;
  int n;
  if (b) {
    short o;
  }
  e = f == 0 ? a : a / f;
  n = 0;
  for (; n <= 3; n = k(n, 1)) {
    m = d = f == 0 ? m : m % f;
    c = h((n = f) == g, d ^ e);
    if (b)
      break;
  }
}
$ 
$ clang-trunk -v
clang version 12.0.0 (https://github.com/llvm/llvm-project.git
8839e278ffcadc62b333423de07756488cae980f)
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/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
$

-- 
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/20200826/4c07e22f/attachment-0001.html>


More information about the llvm-bugs mailing list