[llvm-bugs] [Bug 34485] New: clang crashes at -O1 and above with polly and newgvn: Assertion `isl_union_map_is_injective(Result.keep()) == isl_bool_true' failed.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 5 13:59:36 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34485
Bug ID: 34485
Summary: clang crashes at -O1 and above with polly and newgvn:
Assertion `isl_union_map_is_injective(Result.keep())
== isl_bool_true' failed.
Product: Polly
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Optimizer
Assignee: polly-dev at googlegroups.com
Reporter: helloqirun at gmail.com
CC: llvm-bugs at lists.llvm.org
The hashstag of my polly version is 815fb6452bd4bbd.
$ clang-trunk -v
clang version 6.0.0 (trunk 312522)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang-trunk -mllvm -polly -mllvm -enable-newgvn abc.c -O1
abc.c:14:9: warning: incompatible pointer types assigning to 'short *' from
'int *' [-Wincompatible-pointer-types]
g = &f;
^ ~~
clang-6.0: /home/absozero/trunk/llvm/tools/polly/lib/Transform/DeLICM.cpp:705:
isl::noexceptions::union_map {anonymous}::DeLICMImpl::computePerPHI(const
polly::ScopArrayInfo*): Assertion `isl_union_map_is_injective(Result.keep()) ==
isl_bool_true' failed.
#0 0x00000000020c451a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x20c451a)
#1 0x00000000020c239e llvm::sys::RunSignalHandlers()
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x20c239e)
#2 0x00000000020c24f2 SignalHandler(int)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x20c24f2)
#3 0x00007fb562135330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007fb560cb2c37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007fb560cb6028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007fb560cabbf6 __assert_fail_base
/build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:92:0
#7 0x00007fb560cabca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x00000000026d295b (anonymous
namespace)::DeLICMImpl::tryMapPHI(polly::ScopArrayInfo const*,
isl::noexceptions::map)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x26d295b)
#9 0x00000000026d50a2 (anonymous
namespace)::DeLICMImpl::collapseScalarsToStore(polly::MemoryAccess*)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x26d50a2)
#10 0x00000000026d6320 (anonymous namespace)::DeLICMImpl::greedyCollapse()
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x26d6320)
#11 0x00000000026d6be9 (anonymous namespace)::DeLICM::runOnScop(polly::Scop&)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x26d6be9)
#12 0x0000000001762313 llvm::RGPassManager::runOnFunction(llvm::Function&)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x1762313)
#13 0x0000000001c1d5f3 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x1c1d5f3)
#14 0x0000000001c1d6bc llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x1c1d6bc)
#15 0x0000000001c1d18d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x1c1d18d)
#16 0x000000000226d4e6 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> >)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x226d4e6)
#17 0x0000000002a727bf
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x2a727bf)
#18 0x0000000002c44ae8 clang::ParseAST(clang::Sema&, bool, bool)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x2c44ae8)
#19 0x0000000002a71bcc clang::CodeGenAction::ExecuteAction()
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x2a71bcc)
#20 0x00000000026151ae clang::FrontendAction::Execute()
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x26151ae)
#21 0x00000000025e4a96
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x25e4a96)
#22 0x00000000026a6e83
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/absozero/trunk/root-clang/bin/clang-6.0+0x26a6e83)
#23 0x0000000000af5ed8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/absozero/trunk/root-clang/bin/clang-6.0+0xaf5ed8)
#24 0x0000000000a76091 main
(/home/absozero/trunk/root-clang/bin/clang-6.0+0xa76091)
#25 0x00007fb560c9df45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#26 0x0000000000af23e9 _start
(/home/absozero/trunk/root-clang/bin/clang-6.0+0xaf23e9)
Stack dump:
0. Program arguments: /home/absozero/trunk/root-clang/bin/clang-6.0 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name abc.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir
/home/absozero/trunk/root-clang/lib/clang/6.0.0 -internal-isystem
/usr/local/include -internal-isystem
/home/absozero/trunk/root-clang/lib/clang/6.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-fdebug-compilation-dir /home/absozero/projects/reduction/crash -ferror-limit
19 -fmessage-length 142 -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -mllvm -polly -mllvm -enable-newgvn -o /tmp/abc-ff6de9.o -x
c abc.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'abc.c'.
4. Running pass 'Region Pass Manager' on function '@fn1'
5. Running pass 'Polly - DeLICM/DePRE' on basic block '%for.body6'
clang-6.0: error: unable to execute command: Aborted (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 6.0.0 (trunk 312522)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-6.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-6.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-6.0: note: diagnostic msg: /tmp/abc-9ebb2f.c
clang-6.0: note: diagnostic msg: /tmp/abc-9ebb2f.sh
clang-6.0: note: diagnostic msg:
********************
$ cat abc.c
unsigned a;
long b, d;
short c;
int e, f;
void fn1() {
for (;;) {
for (; f;)
for (;;)
;
a -= 0 < b;
for (; f <= 5; f++) {
short *g = &c;
*g = a++ ? e *= 4 : c;
g = &f;
d = *g;
}
}
}
--
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/20170905/d651b553/attachment.html>
More information about the llvm-bugs
mailing list