[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 01:20:14 PDT 2021


uabelho added a comment.

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.
  PLEASE submit a bug report to https://developer.internal.ericsson.com/docs/bbi/languages/support/ and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.      Program arguments: /repo/uabelho/llvm-project/llvm/build-all/bin/clang-13 -cc1 -triple x86_64-unknown-linux-simulator_phoenixIV -emit-obj --mrelax-relocations -disable-free -main-file-name thvs3.c -mrelocation-model static -finline-local-initializers -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debug-info-kind=line-tables-only -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/repo/uabelho/SuperTestMondrian/SuperTest/log/phoenix4_dev/work -resource-dir /repo/uabelho/llvm-project/llvm/build-all/lib/clang/13.0.0 -include /repo/uabelho/llvm-project/llvm/sdk-bin/llvm/fader2_sdk/compiler/fader2_arch/fader2_2/contrib/CKFref/flexc_ckf_ref.h -D __FLEXC_HOST -I h -internal-isystem /repo/uabelho/llvm-project/llvm/sdk-bin/llvm/fader2_sdk/compiler-clang/lib/clang/current/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wpedantic -Wno-unused-command-line-argument -Wno-unused-but-set-variable -std=dspc -fflexc -fdebug-compilation-dir=/repo/uabelho/SuperTestMondrian/SuperTest/log/phoenix4_dev/work -ferror-limit 19 -freroll-loops -fgnuc-version=4.2.1 -finline-hint-functions -flegacy-pass-manager -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/thvs3-a38fb2.o -x c thvs3.c
  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


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