[llvm-bugs] [Bug 52161] New: Failed assertion in LoopStrengthReduce DbgRewriteSalvageableDVIs when printing a SCEV
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 13 01:58:53 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52161
Bug ID: 52161
Summary: Failed assertion in LoopStrengthReduce
DbgRewriteSalvageableDVIs when printing a SCEV
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: david.stenberg at ericsson.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 25359
--> https://bugs.llvm.org/attachment.cgi?id=25359&action=edit
IR reproducer.
Commit: 444ec0957c58492ecce0569bb20b7d3ad59d37bb
$ opt -debug -S -loop-reduce foo.ll
[...]
scev-salvage: SCEV salvaging not possible. An IV could not be identified.
scev-salvage: Selected IV from loop header: %iv = phi i16 [ %ivdec, %for.body
], [ undef, %for.body.preheader ] with SCEV: {undef,+,-1}<%for.body>
scev-salvage: IV SCEV: {undef,+,-1}<%for.body>
scev-salvage: value to recover SCEV: opt:
/llvm/include/llvm/Support/Casting.h:104: static bool llvm::isa_impl_cl<To,
const From*>::doit(const From*) [with To = llvm::ConstantExpr; From =
llvm::Value]: Assertion `Val && "isa<> used on a null pointer"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0. Program arguments: ./build/bin/opt -debug -S -loop-reduce foo.ll
1. Running pass 'Function Pass Manager' on module 'foo.ll'.
2. Running pass 'Loop Pass Manager' on function '@n'
3. Running pass 'Loop Strength Reduction' on basic block '%m'
#0 0x00007f8874c74f1f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x00007f8874c726cd SignalHandler(int) Signals.cpp:0:0
#2 0x00007f887a84c980 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#3 0x00007f887436dfb7 raise
/build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#4 0x00007f887436f921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
#5 0x00007f887435f48a __assert_fail_base
/build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
#6 0x00007f887435f502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
#7 0x00007f88759c99d4 bool llvm::isa<llvm::SCEVUnionPredicate,
llvm::SCEVPredicate const*>(llvm::SCEVPredicate const* const&)
(.isra.1181.part.1182) ScalarEvolution.cpp:0:0
#8 0x00007f8875c98b4b llvm::SCEVUnknown::isSizeOf(llvm::Type*&) const
(/build/bin/../lib/libLLVMAnalysis.so.14git+0x373b4b)
#9 0x00007f8875c98e10 llvm::SCEV::print(llvm::raw_ostream&) const
(/build/bin/../lib/libLLVMAnalysis.so.14git+0x373e10)
#10 0x00007f88771423a1 ReduceLoopStrength(llvm::Loop*, llvm::IVUsers&,
llvm::ScalarEvolution&, llvm::DominatorTree&, llvm::LoopInfo&,
llvm::TargetTransformInfo const&, llvm::AssumptionCache&,
llvm::TargetLibraryInfo&, llvm::MemorySSA*) LoopStrengthReduce.cpp:0:0
#11 0x00007f887714356b (anonymous
namespace)::LoopStrengthReduce::runOnLoop(llvm::Loop*, llvm::LPPassManager&)
LoopStrengthReduce.cpp:0:0
It is the following debug printout that leads to the failed assertion:
LLVM_DEBUG(dbgs() << "scev-salvage: value to recover SCEV: "
<< *DVIRec.SCEV << '\n');
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211013/0052b301/attachment-0001.html>
More information about the llvm-bugs
mailing list