[PATCH] D94376: [MemCpyOpt] Enable MemorySSA by default
Mikael Holmén via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 22 00:25:12 PST 2021
uabelho added a comment.
I ran into a crash in memcpyopt with this patch.
Running
opt -S -o - bbi-53212.ll -memcpyopt
yields
opt: ../include/llvm/Support/Casting.h:104: static bool llvm::isa_impl_cl<llvm::MemoryUse, const llvm::MemoryUseOrDef *>::doit(const From *) [To = llvm::MemoryUse, From = const llvm::MemoryUseOrDef *]: 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: /data/repo/master/llvm/build-all/bin/opt -S -o - bbi-53212.ll -memcpyopt
#0 0x00000000029461e3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/repo/master/llvm/build-all/bin/opt+0x29461e3)
#1 0x0000000002943e9e llvm::sys::RunSignalHandlers() (/data/repo/master/llvm/build-all/bin/opt+0x2943e9e)
#2 0x00000000029466a6 SignalHandler(int) Signals.cpp:0:0
#3 0x00007ff087446980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x00007ff084517fb7 raise /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007ff084519921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
#6 0x00007ff08450948a __assert_fail_base /build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
#7 0x00007ff084509502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
#8 0x00000000019f8722 llvm::MemoryUseOrDef::getDefiningAccess() const (/data/repo/master/llvm/build-all/bin/opt+0x19f8722)
#9 0x0000000002766c6d llvm::MemCpyOptPass::processByValArgument(llvm::CallBase&, unsigned int) (/data/repo/master/llvm/build-all/bin/opt+0x2766c6d)
#10 0x0000000002767810 llvm::MemCpyOptPass::iterateOnFunction(llvm::Function&) (/data/repo/master/llvm/build-all/bin/opt+0x2767810)
#11 0x0000000002768280 llvm::MemCpyOptPass::runImpl(llvm::Function&, llvm::MemoryDependenceResults*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::AssumptionCache*, llvm::DominatorTree*, llvm::MemorySSA*) (/data/repo/master/llvm/build-all/bin/opt+0x2768280)
#12 0x0000000002767c69 llvm::MemCpyOptPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/data/repo/master/llvm/build-all/bin/opt+0x2767c69)
#13 0x0000000002bf031d llvm::detail::PassModel<llvm::Function, llvm::MemCpyOptPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/data/repo/master/llvm/build-all/bin/opt+0x2bf031d)
#14 0x00000000021720c9 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/data/repo/master/llvm/build-all/bin/opt+0x21720c9)
#15 0x0000000000a7cbfd llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/data/repo/master/llvm/build-all/bin/opt+0xa7cbfd)
#16 0x00000000021768b6 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/data/repo/master/llvm/build-all/bin/opt+0x21768b6)
#17 0x000000000076c61d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/data/repo/master/llvm/build-all/bin/opt+0x76c61d)
#18 0x0000000002170f2b llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/data/repo/master/llvm/build-all/bin/opt+0x2170f2b)
#19 0x0000000000764fe1 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::StringRef>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool) (/data/repo/master/llvm/build-all/bin/opt+0x764fe1)
#20 0x0000000000776b32 main (/data/repo/master/llvm/build-all/bin/opt+0x776b32)
#21 0x00007ff0844fabf7 __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#22 0x000000000075e76a _start (/data/repo/master/llvm/build-all/bin/opt+0x75e76a)
F15612676: bbi-53212.ll <https://reviews.llvm.org/F15612676>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94376/new/
https://reviews.llvm.org/D94376
More information about the cfe-commits
mailing list