[all-commits] [llvm/llvm-project] 63f417: [ADT] Remove 0-width Asserts in APInt.getZExtValue

Schuyler Eldridge via All-commits all-commits at lists.llvm.org
Tue Nov 30 14:03:25 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 63f417ef39963afa9722a7b3c5cf3b28a9d41883
      https://github.com/llvm/llvm-project/commit/63f417ef39963afa9722a7b3c5cf3b28a9d41883
  Author: Schuyler Eldridge <schuyler.eldridge at sifive.com>
  Date:   2021-11-30 (Tue, 30 Nov 2021)

  Changed paths:
    M llvm/include/llvm/ADT/APInt.h
    M llvm/unittests/ADT/APIntTest.cpp

  Log Message:
  -----------
  [ADT] Remove 0-width Asserts in APInt.getZExtValue

Remove assertion that disallows getting a zero-extended value from a
zero-width APInt.  This check is too restrictive and makes it difficult
to use APInt to model zero-width things, e.g., zero-width wires in the
CIRCT project.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge at sifive.com>

Reviewed By: lattner, darthscsi, nikic

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




More information about the All-commits mailing list