[all-commits] [llvm/llvm-project] 21a1d4: [AMDGPU] Change numBitsSigned for simplicity and d...

Jay Foad via All-commits all-commits at lists.llvm.org
Fri Oct 29 06:22:19 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 21a1d4cf719e977b1712cb4387b0f12b5175b916
      https://github.com/llvm/llvm-project/commit/21a1d4cf719e977b1712cb4387b0f12b5175b916
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-10-29 (Fri, 29 Oct 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp

  Log Message:
  -----------
  [AMDGPU] Change numBitsSigned for simplicity and document it. NFC.

Change numBitsSigned to return the minimum size of a signed integer that
can hold the value. This is different by one from the previous result
but is more consistent with numBitsUnsigned. Update all callers. All
callers are now more consistent between the signed and unsigned cases,
and some callers get simpler, especially the ones that deal with
quantities like numBitsSigned(LHS) + numBitsSigned(RHS).

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




More information about the All-commits mailing list