Issue 203519
Summary opt -passes=sroa crashes: Assertion `getActiveBits() <= 64 && "Too many bits for uint64_t"' failed.
Labels new issue
Assignees
Reporter k-arrows
    Reproducer (see llvm/test/Transforms/InstCombine/alloca-big.ll):
https://godbolt.org/z/E6ePfYdMx

Backtrace:
```console
opt: /root/llvm-project/llvm/include/llvm/ADT/APInt.h:1566: uint64_t llvm::APInt::getZExtValue() const: Assertion `getActiveBits() <= 64 && "Too many bits for uint64_t"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/opt -o /app/output.s -S -passes=sroa <source>
1.	Running pass "function(sroa<modify-cfg>)" on module "<source>"
2.	Running pass "sroa<modify-cfg>" on function "test_bigalloc"
 #0 0x0000000005aa8708 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5aa8708)
 #1 0x0000000005aa5544 llvm::sys::RunSignalHandlers() (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5aa5544)
 #2 0x0000000005aa56ba SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000787d32045330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x0000787d3209eb2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
 #5 0x0000787d3204527e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
 #6 0x0000787d320288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
 #7 0x0000787d3202881b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
 #8 0x0000787d3203b517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
 #9 0x0000000005770d64 llvm::AllocaInst::getAllocationSize(llvm::DataLayout const&) const (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5770d64)
#10 0x0000000004940247 (anonymous namespace)::SROA::runSROA(llvm::Function&) SROA.cpp:0:0
#11 0x0000000004941563 llvm::SROAPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4941563)
#12 0x00000000030cecbe llvm::detail::PassModel<llvm::Function, llvm::SROAPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x30cecbe)
#13 0x000000000580c8c7 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x580c8c7)
#14 0x0000000000f4015e llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0xf4015e)
#15 0x000000000580b436 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x580b436)
#16 0x000000000098b55e llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x98b55e)
#17 0x000000000580aa67 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x580aa67)
#18 0x0000000000995b69 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x995b69)
#19 0x000000000098933b optMain (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x98933b)
#20 0x0000787d3202a1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
#21 0x0000787d3202a28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
#22 0x000000000097ec25 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x97ec25)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to