Skip to content
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

IR Outliner: Assertion `OutputStoreBBs.size() < 2 && "Different store sets not handled!"' failed. #54431

Closed
ornata opened this issue Mar 18, 2022 · 2 comments

Comments

@ornata
Copy link

ornata commented Mar 18, 2022

This appeared when building a larger program. I think it hasn't been handled by any of the (unlanded) patches.

Bugpointed test case: https://godbolt.org/z/6T8Mq35bo

opt: /root/llvm-project/llvm/lib/Transforms/IPO/IROutliner.cpp:2113: void createSwitchStatement(llvm::Module&, OutlinableGroup&, llvm::DenseMap<llvm::Value*, llvm::BasicBlock*>&, std::vector<llvm::DenseMap<llvm::Value*, llvm::BasicBlock*> >&): Assertion `OutputStoreBBs.size() < 2 && "Different store sets not handled!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
...
 #7 0x00005565f7696bda createSwitchStatement(llvm::Module&, OutlinableGroup&, llvm::DenseMap<llvm::Value*, llvm::BasicBlock*, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, llvm::BasicBlock*> >&, std::vector<llvm::DenseMap<llvm::Value*, llvm::BasicBlock*, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, llvm::BasicBlock*> >, std::allocator<llvm::DenseMap<llvm::Value*, llvm::BasicBlock*, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, llvm::BasicBlock*> > > >&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x2c96bda)
 #8 0x00005565f7698882 llvm::IROutliner::deduplicateExtractedSections(llvm::Module&, OutlinableGroup&, std::vector<llvm::Function*, std::allocator<llvm::Function*> >&, unsigned int&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x2c98882)
Compiler returned: 139

CC: @AndrewLitteken

@AndrewLitteken
Copy link
Contributor

AndrewLitteken added a commit that referenced this issue Apr 14, 2022
…the unique numbering gneration for phi nodes for each exit path

Issue: #54431

PHINodes that need to be generated to accommodate a PHINode outside the region due to different output paths need to have their own numbering to determine the number of output schemes required to properly handle all the outlined regions. This numbering was previously only determined by the order and values of the incoming values, as well as the parent block of the PHINode. This adds the incoming blocks to the calculation of a hash value for these PHINodes as well, and the supporting infrastructure to give each block in a region a corresponding canonical numbering.

Reviewer: paquette

Differential Revision: https://reviews.llvm.org/D122207
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this issue Oct 7, 2022
…the unique numbering gneration for phi nodes for each exit path

Issue: llvm/llvm-project#54431

PHINodes that need to be generated to accommodate a PHINode outside the region due to different output paths need to have their own numbering to determine the number of output schemes required to properly handle all the outlined regions. This numbering was previously only determined by the order and values of the incoming values, as well as the parent block of the PHINode. This adds the incoming blocks to the calculation of a hash value for these PHINodes as well, and the supporting infrastructure to give each block in a region a corresponding canonical numbering.

Reviewer: paquette

Differential Revision: https://reviews.llvm.org/D122207
@xgupta
Copy link
Contributor

xgupta commented Jan 24, 2023

patch is committed, should be fine to close this issue.

@xgupta xgupta closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants