https://bugs.llvm.org/show_bug.cgi?id=52426
Bug ID: 52426
Summary: LoopVersioning asserts when a runtime check is not
necessary
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Created attachment 25427
--> https://bugs.llvm.org/attachment.cgi?id=25427&action=edit
reproducer
In the attached testcase, LoopLoadElim unconditionally asks LoopVersioning to
add a runtime check, assuming that the check is optional. Unfortunately,
LoopVersioning will assert if the check is not needed. Should the assert just
be changed to return silently?
opt -loop-load-elim fail.ll
opt: llvm/llvm/lib/Transforms/Utils/LoopVersioning.cpp:88: void
llvm::LoopVersioning::versionLoop(const
llvm::SmallVectorImpl<llvm::Instruction*>&): Assertion `RuntimeCheck && "called
even though we don't need " "any runtime checks"' failed.
...
10 0x00007f989b41a607 llvm::LoopVersioning::versionLoop()
llvm/llvm/include/llvm/Transforms/Utils/LoopVersioning.h:63:0
#11 0x00007f989b416441 (anonymous
namespace)::LoadEliminationForLoop::processLoop()
llvm/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp:575:0
#12 0x00007f989b416899 eliminateLoadsAcrossLoops(llvm::Function&,
llvm::LoopInfo&, llvm::DominatorTree&, llvm::BlockFrequencyInfo*,
llvm::ProfileSummaryInfo*, llvm::ScalarEvolution*, llvm::AssumptionCache*,
llvm::function_ref<llvm::LoopAccessInfo const& (llvm::Loop&)>)
llvm/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp:637:0
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs