[all-commits] [llvm/llvm-project] c180da: [APInt] Fix getAllOnes() with zero width (#112227)

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Oct 15 00:34:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c180da93e0257a92b0bb428f70c1b0de083ebf72
      https://github.com/llvm/llvm-project/commit/c180da93e0257a92b0bb428f70c1b0de083ebf72
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

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

  Log Message:
  -----------
  [APInt] Fix getAllOnes() with zero width (#112227)

This makes sure that APInt::getAllOnes() keeps working after the APInt
constructor assertions are enabled.

I'm relaxing the requirement for the signed case to either an all zeros
or all ones integer. This is basically saying that we can interpret the
zero-width integer as either positive or negative.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list