[llvm] Reapply [APInt] Enable APInt ctor assertion by default (PR #114539)
Mikael Holmén via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 05:59:46 PST 2024
mikaelholmen wrote:
Another one here:
```opt -passes=instcombine bbi-101454.ll -S -o /dev/null```
results in
```
opt: ../include/llvm/ADT/APInt.h:128: llvm::APInt::APInt(unsigned int, uint64_t, bool, bool): Assertion `llvm::isUIntN(BitWidth, val) && "Value is not an N-bit unsigned value"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: build-all/bin/opt -passes=instcombine bbi-101454.ll -S -o /dev/null
1. Running pass "function(instcombine<max-iterations=1;verify-fixpoint>)" on module "bbi-101454.ll"
2. Running pass "instcombine<max-iterations=1;verify-fixpoint>" on function "f_434_1400"
#0 0x000055a682c8a778 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (build-all/bin/opt+0x4444778)
#1 0x000055a682c8823e llvm::sys::RunSignalHandlers() (build-all/bin/opt+0x444223e)
#2 0x000055a682c8afad SignalHandler(int) Signals.cpp:0:0
#3 0x00007f622ac1dcf0 __restore_rt (/lib64/libpthread.so.0+0x12cf0)
#4 0x00007f62287d6acf raise (/lib64/libc.so.6+0x4eacf)
#5 0x00007f62287a9ea5 abort (/lib64/libc.so.6+0x21ea5)
#6 0x00007f62287a9d79 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21d79)
#7 0x00007f62287cf426 (/lib64/libc.so.6+0x47426)
#8 0x000055a6839925cc llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(llvm::BinaryOperator&) InstCombineAddSub.cpp:0:0
#9 0x000055a683993d90 llvm::InstCombinerImpl::visitAdd(llvm::BinaryOperator&) InstCombineAddSub.cpp:0:0
#10 0x000055a6838e6f1a llvm::InstCombinerImpl::run() InstructionCombining.cpp:0:0
#11 0x000055a6838ea7bd combineInstructionsOverFunction(llvm::Function&, llvm::InstructionWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::BranchProbabilityInfo*, llvm::ProfileSummaryInfo*, llvm::InstCombineOptions const&) InstructionCombining.cpp:0:0
#12 0x000055a6838e9b36 llvm::InstCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x50a3b36)
#13 0x000055a684042a3d llvm::detail::PassModel<llvm::Function, llvm::InstCombinePass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilderPipelines.cpp:0:0
#14 0x000055a682e93307 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x464d307)
#15 0x000055a68404877d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilderPipelines.cpp:0:0
#16 0x000055a682e97e96 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0x4651e96)
#17 0x000055a68404221d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) PassBuilderPipelines.cpp:0:0
#18 0x000055a682e92037 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0x464c037)
#19 0x000055a683fe6373 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) (build-all/bin/opt+0x57a0373)
#20 0x000055a682c51b4a optMain (build-all/bin/opt+0x440bb4a)
#21 0x00007f62287c2d85 __libc_start_main (/lib64/libc.so.6+0x3ad85)
#22 0x000055a682c4b96e _start (build-all/bin/opt+0x440596e)
Abort (core dumped)
```
[bbi-101454.ll.gz](https://github.com/user-attachments/files/17816203/bbi-101454.ll.gz)
https://github.com/llvm/llvm-project/pull/114539
More information about the llvm-commits
mailing list