[all-commits] [llvm/llvm-project] 8ab819: [ConstantRange] Add toKnownBits() method

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon May 16 07:12:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ab819ad90d647b96bb4b6842a742d2552ba9e9c
      https://github.com/llvm/llvm-project/commit/8ab819ad90d647b96bb4b6842a742d2552ba9e9c
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-16 (Mon, 16 May 2022)

  Changed paths:
    M llvm/include/llvm/IR/ConstantRange.h
    M llvm/lib/IR/ConstantRange.cpp
    M llvm/unittests/IR/ConstantRangeTest.cpp

  Log Message:
  -----------
  [ConstantRange] Add toKnownBits() method

Add toKnownBits() method to mirror fromKnownBits(). We know the
top bits that are constant between min and max.

The return value for an empty range is chosen to be conservative.




More information about the All-commits mailing list