[all-commits] [llvm/llvm-project] 824838: [NVPTX][NFC] Use unsigned for all custom printmethods

ldrumm via All-commits all-commits at lists.llvm.org
Wed Sep 13 05:49:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8248388c5e1ea1ab1ed3b18d80fbb758140b5822
      https://github.com/llvm/llvm-project/commit/8248388c5e1ea1ab1ed3b18d80fbb758140b5822
  Author: Luke Drummond <luke.drummond at codeplay.com>
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
    M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h

  Log Message:
  -----------
  [NVPTX][NFC] Use unsigned for all custom printmethods

We were using a mix of unsigned and signed ints in the various PTX asm
printers. All calls from tablgen use a non-negative immediate, so either
will work, but when doing arithmetic on the return value from
`getNumOperands`, or calling `getOperand`, it makes sense to keep
everything unsigned.




More information about the All-commits mailing list