You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
… calls without commutativity
Created to fix: llvm/llvm-project#53537
Some intrinsics functions are considered commutative since they are performing operations like addition or multiplication. Some of these have extra parameters to provide extra information that are not part of the operation itself and are not commutative. This makes sure that if an instruction that is an intrinsic takes the non commutative path to handle this case.
Reviewer: paquette
Closes Issue #53537
Differential Revision: https://reviews.llvm.org/D118807
llvm commit: 281d29b
Reproduce with:
opt -passes='require' -o /dev/null bbi-65410.ll
bbi-65410.ll.gz
Result:
opt: ../lib/Analysis/IRSimilarityIdentifier.cpp:998: void llvm::IRSimilarity::IRSimilarityCandidate::createCanonicalRelationFrom(llvm::IRSimilarity::IRSimilarityCandidate &, DenseMap<unsigned int, DenseSet > &, DenseMap<unsigned int, DenseSet > &): Assertion `Found && "Could not find matching value for source GVN"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: build-all/bin/opt -passes=require -o /dev/null bbi-65410.ll
#0 0x0000000002cd0483 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (build-all/bin/opt+0x2cd0483)
#1 0x0000000002cce0fe llvm::sys::RunSignalHandlers() (build-all/bin/opt+0x2cce0fe)
#2 0x0000000002cd0806 SignalHandler(int) Signals.cpp:0:0
#3 0x00007f558d4e3630 __restore_rt sigaction.c:0:0
#4 0x00007f558ac16387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007f558ac17a78 abort (/lib64/libc.so.6+0x37a78)
#6 0x00007f558ac0f1a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
#7 0x00007f558ac0f252 (/lib64/libc.so.6+0x2f252)
#8 0x0000000001b59cba llvm::IRSimilarity::IRSimilarityCandidate::createCanonicalRelationFrom(llvm::IRSimilarity::IRSimilarityCandidate&, llvm::DenseMap<unsigned int, llvm::DenseSet<unsigned int, llvm::DenseMapInfo<unsigned int, void> >, llvm::DenseMapInfo<unsigned int, void>, llvm::detail::DenseMapPair<unsigned int, llvm::DenseSet<unsigned int, llvm::DenseMapInfo<unsigned int, void> > > >&, llvm::DenseMap<unsigned int, llvm::DenseSet<unsigned int, llvm::DenseMapInfo<unsigned int, void> >, llvm::DenseMapInfo<unsigned int, void>, llvm::detail::DenseMapPair<unsigned int, llvm::DenseSet<unsigned int, llvm::DenseMapInfo<unsigned int, void> > > >&) (build-all/bin/opt+0x1b59cba)
#9 0x0000000001b5abe1 llvm::IRSimilarity::IRSimilarityIdentifier::findCandidates(std::vector<llvm::IRSimilarity::IRInstructionData*, std::allocatorllvm::IRSimilarity::IRInstructionData* >&, std::vector<unsigned int, std::allocator >&) (build-all/bin/opt+0x1b5abe1)
#10 0x0000000001b5b9ca llvm::IRSimilarity::IRSimilarityIdentifier::findSimilarity(llvm::Module&) (build-all/bin/opt+0x1b5b9ca)
#11 0x0000000001b5bf6a llvm::IRSimilarityAnalysis::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (build-all/bin/opt+0x1b5bf6a)
#12 0x0000000002fda230 llvm::detail::AnalysisPassModel<llvm::Module, llvm::IRSimilarityAnalysis, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Module::Invalidator>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) crtstuff.c:0:0
#13 0x000000000241ee6e llvm::AnalysisManagerllvm::Module::getResultImpl(llvm::AnalysisKey*, llvm::Module&) (build-all/bin/opt+0x241ee6e)
#14 0x0000000002fe6d18 llvm::RequireAnalysisPass<llvm::IRSimilarityAnalysis, llvm::Module, llvm::AnalysisManagerllvm::Module >::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) crtstuff.c:0:0
#15 0x0000000002fe6b5d llvm::detail::PassModel<llvm::Module, llvm::RequireAnalysisPass<llvm::IRSimilarityAnalysis, llvm::Module, llvm::AnalysisManagerllvm::Module >, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Module >::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) crtstuff.c:0:0
#16 0x000000000241c6e8 llvm::PassManager<llvm::Module, llvm::AnalysisManagerllvm::Module >::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (build-all/bin/opt+0x241c6e8)
#17 0x00000000007a3662 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRefllvm::StringRef, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool) (build-all/bin/opt+0x7a3662)
#18 0x00000000007b6234 main (build-all/bin/opt+0x7b6234)
#19 0x00007f558ac02555 __libc_start_main (/lib64/libc.so.6+0x22555)
#20 0x000000000079eaec _start (build-all/bin/opt+0x79eaec)
This starts happening with 3785c1d:
[IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions
Commented here:
https://reviews.llvm.org/D109450#3283855
The text was updated successfully, but these errors were encountered: