[PATCH] D105510: [ScalarEvolution] Strictly enforce pointer/int type rules.
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 13 03:08:50 PDT 2021
uabelho added a comment.
In D105510#2873305 <https://reviews.llvm.org/D105510#2873305>, @uabelho wrote:
> Hi,
> I see one of the new asserts blow when SCEV is used from LoopReroll:
>
> clang-13: ../lib/Analysis/ScalarEvolution.cpp:2983: const llvm::SCEV *llvm::ScalarEvolution::getMulExpr(SmallVectorImpl<const llvm::SCEV *> &, SCEV::NoWrapFlags, unsigned int): Assertion `!ETy->isPointerTy()' failed.
> [...]
> 1. <eof> parser at end of file
> 2. Per-module optimization passes
> 3. Running pass 'CallGraph Pass Manager' on module 'thvs3.c'.
> 4. Running pass 'Loop Pass Manager' on function '@test'
> 5. Running pass 'Reroll loops' on basic block '%for.body42.3.1'
> #0 0x0000000002d679e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/repo/uabelho/llvm-project/llvm/build-all/bin/clang-13+0x2d679e8)
> #1 0x0000000002d6569e llvm::sys::RunSignalHandlers() (/repo/uabelho/llvm-project/llvm/build-all/bin/clang-13+0x2d6569e)
> #2 0x0000000002d68086 SignalHandler(int) Signals.cpp:0:0
> #3 0x00007fdf151ab630 __restore_rt sigaction.c:0:0
> #4 0x00007fdf128de387 raise (/lib64/libc.so.6+0x36387)
> #5 0x00007fdf128dfa78 abort (/lib64/libc.so.6+0x37a78)
> #6 0x00007fdf128d71a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
> #7 0x00007fdf128d7252 (/lib64/libc.so.6+0x2f252)
> #8 0x0000000001efa418 llvm::ScalarEvolution::getMulExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&, llvm::SCEV::NoWrapFlags, unsigned int) (/repo/uabelho/llvm-project/llvm/build-all/bin/clang-13+0x1efa418)
> #9 0x0000000002b4f73f (anonymous namespace)::LoopReroll::DAGRootTracker::validateRootSet((anonymous namespace)::LoopReroll::DAGRootSet&) LoopRerollPass.cpp:0:0
> #10 0x0000000002b4f288 (anonymous namespace)::LoopReroll::DAGRootTracker::findRootsBase(llvm::Instruction*, llvm::SmallPtrSet<llvm::Instruction*, 16u>) LoopRerollPass.cpp:0:0
> #11 0x0000000002b4e51e (anonymous namespace)::LoopReroll::DAGRootTracker::findRootsRecursive(llvm::Instruction*, llvm::SmallPtrSet<llvm::Instruction*, 16u>) LoopRerollPass.cpp:0:0
> #12 0x0000000002b4e694 (anonymous namespace)::LoopReroll::DAGRootTracker::findRootsRecursive(llvm::Instruction*, llvm::SmallPtrSet<llvm::Instruction*, 16u>) LoopRerollPass.cpp:0:0
> #13 0x0000000002b4e694 (anonymous namespace)::LoopReroll::DAGRootTracker::findRootsRecursive(llvm::Instruction*, llvm::SmallPtrSet<llvm::Instruction*, 16u>) LoopRerollPass.cpp:0:0
> #14 0x0000000002b46b71 (anonymous namespace)::LoopReroll::runOnLoop(llvm::Loop*) LoopRerollPass.cpp:0:0
> #15 0x0000000002b491d2 (anonymous namespace)::LoopRerollLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) LoopRerollPass.cpp:0:0
Reduced opt reproducer:
opt -loop-reroll loop-reroll.ll -S -o /dev/null
F17909533: loop-reroll.ll <https://reviews.llvm.org/F17909533>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105510/new/
https://reviews.llvm.org/D105510
More information about the llvm-commits
mailing list