[all-commits] [llvm/llvm-project] f84c70: [CodeView] Saturate values bigger than supported b...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Mon Jul 26 13:15:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f84c70a3793909ec16b3e53a502f0f9ea99c6af3
      https://github.com/llvm/llvm-project/commit/f84c70a3793909ec16b3e53a502f0f9ea99c6af3
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2021-07-26 (Mon, 26 Jul 2021)

  Changed paths:
    M llvm/include/llvm/ADT/APInt.h
    M llvm/include/llvm/IR/DIBuilder.h
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
    M llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
    M llvm/lib/IR/DIBuilder.cpp
    A llvm/test/DebugInfo/COFF/integer-128.ll

  Log Message:
  -----------
  [CodeView] Saturate values bigger than supported by APInt.

This fixes an assert firing when compiling code which involves 128 bit
integrals.

This would trigger runtime checks similar to this:
```
Assertion failed: getMinSignedBits() <= 64 && "Too many bits for int64_t", file llvm/include/llvm/ADT/APInt.h, line 1646
```

To get around this, we just saturate those big values.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D105320




More information about the All-commits mailing list