[PATCH] D82005: [InstCombine] Replace selects with Phis
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 03:53:07 PST 2020
uabelho added a comment.
Hi,
We've noticed a crash that started occuring with this patch.
Running
opt -S -o - bbi-50827.ll -instcombine
results in
opt: ../include/llvm/ADT/DenseMap.h:1241: llvm::DenseMapIterator::pointer llvm::DenseMapIterator<llvm::BasicBlock *, std::unique_ptr<llvm::DomTreeNodeBase<llvm::BasicBlock>, std::default_delete<llvm::DomTreeNodeBase<llvm::BasicBlock> > >, llvm::DenseMapInfo<llvm::BasicBlock *>, llvm::detail::DenseMapPair<llvm::BasicBlock *, std::unique_ptr<llvm::DomTreeNodeBase<llvm::BasicBlock>, std::default_delete<llvm::DomTreeNodeBase<llvm::BasicBlock> > > >, true>::operator->() const [KeyT = llvm::BasicBlock *, ValueT = std::unique_ptr<llvm::DomTreeNodeBase<llvm::BasicBlock>, std::default_delete<llvm::DomTreeNodeBase<llvm::BasicBlock> > >, KeyInfoT = llvm::DenseMapInfo<llvm::BasicBlock *>, Bucket = llvm::detail::DenseMapPair<llvm::BasicBlock *, std::unique_ptr<llvm::DomTreeNodeBase<llvm::BasicBlock>, std::default_delete<llvm::DomTreeNodeBase<llvm::BasicBlock> > > >, IsConst = true]: Assertion `Ptr != End && "dereferencing end() iterator"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
with bbi-50827.ll being
@a = external global i1, align 1
define i16 @g() {
entry:
%.b = load i1, i1* @a, align 1
%0 = select i1 %.b, i16 0, i16 5
br label %for.body.i
for.body.i: ; preds = %for.body.i, %entry
br label %for.body.i
f.exit: ; No predecessors!
ret i16 %0
}
Note the use of %0 in f.exit, which is not reachable from entry.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82005/new/
https://reviews.llvm.org/D82005
More information about the llvm-commits
mailing list