[PATCH] D112813: [AMDGPU] Change numBitsSigned for simplicity and document it. NFC.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 06:02:32 PDT 2021


foad created this revision.
foad added reviewers: abinavpp, arsenm, rampitec.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

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).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112813

Files:
  llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
  llvm/lib/Target/AMDGPU/SIISelLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112813.383328.patch
Type: text/x-patch
Size: 4835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211029/2549eec1/attachment.bin>


More information about the llvm-commits mailing list