-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polly fails in tools/polly/lib/IndependentBlocks.cpp:539 with assert "Cannot generate independent blocks" #12681
Comments
assigned to @etherzhhb |
This is a bug in the IndependentBlocks pass. The bug can be reproduced by: But everything seems ok with: So i doubt that the CodeGeneration pass broken the independent blocks. I will have a look. PS: The bug cannot be reproduced in 32bit ubuntu. |
The patch that partial fix the bug I run: got:
|
testcase There are two scops. The problem is that the second scop uses a variable defined in the first scop "%nf.0.reload". As the analysis of parameters has been performed for all the scops before starting to generate code, there are parameters that refer to SSA names of the original code of the first scop, and after we generate code for the parameters of the second scop with:
the independent blocks assert ICEs the compiler. This looks like a bug related to the fact that we perform the analysis of all the scops in the current function before we start generating code for all the scops. The code generation of the first scop invalidates the information for the second scop. |
The bug is reopened and investigated again in 21204. Tobias will take a look. *** This bug has been marked as a duplicate of bug llvm/llvm-bugzilla-archive#21204 *** |
Move to Polly Product. |
mentioned in issue llvm/llvm-bugzilla-archive#21204 |
Extended Description
To reproduce:
$ opt -load LLVMPolly.so -polly foo.ll -basicaa -polly-region-simplify -polly-codegen -lower-expect
opt: /prj/dsp/austin/llvm/test/users/spop/build/hexagon/llvm-mainline-081f52b-clang-mainline-6aaf0c9-polly-master-2439c4a/tools/polly/lib/IndependentBlocks.cpp:539: void::IndependentBlocks::verifyScop(const llvm::Region*) const: Assertion `areAllBlocksIndependent(R) && "Cannot generate independent blocks"' failed.
0 opt 0x0000000000bfb9b1
1 opt 0x0000000000bfb7a4
2 libpthread.so.0 0x00002b43a5d46e00
3 libc.so.6 0x00002b43a63f6f45 gsignal + 53
4 libc.so.6 0x00002b43a63f8340 abort + 272
5 libc.so.6 0x00002b43a63f0486 __assert_fail + 246
6 LLVMPolly.so 0x00002b43a66c24ef
7 LLVMPolly.so 0x00002b43a66c2480
8 opt 0x0000000000b835a4 llvm::PMDataManager::verifyPreservedAnalysis(llvm::Pass*) + 192
9 opt 0x00000000009954a2 llvm::RGPassManager::runOnFunction(llvm::Function&) + 1336
10 opt 0x0000000000b86252 llvm::FPPassManager::runOnFunction(llvm::Function&) + 432
11 opt 0x0000000000b8649d llvm::FPPassManager::runOnModule(llvm::Module&) + 107
12 opt 0x0000000000b867e0 llvm::MPPassManager::runOnModule(llvm::Module&) + 456
13 opt 0x0000000000b86cf6 llvm::PassManagerImpl::run(llvm::Module&) + 130
14 opt 0x0000000000b86ff1 llvm::PassManager::run(llvm::Module&) + 39
15 opt 0x00000000006412ec main + 4683
16 libc.so.6 0x00002b43a63e4304 __libc_start_main + 244
17 opt 0x0000000000632269
Stack dump:
0. Program arguments: opt -load LLVMPolly.so -polly foo.ll -basicaa -polly-region-simplify -polly-codegen -lower-expect
Aborted
The text was updated successfully, but these errors were encountered: