[PATCH] D90107: [TableGen] [AMDGPU] Add !sub bang operator for subtraction

Paul C. Anagnostopoulos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 24 15:46:28 PDT 2020


Paul-C-Anagnostopoulos created this revision.
Paul-C-Anagnostopoulos added reviewers: lattner, nhaehnle, madhur13490, tstellar.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.
Paul-C-Anagnostopoulos requested review of this revision.
Herald added a subscriber: wdng.

In my travels through TableGen and the backends, I came across:

  foreach Index = Indexes<!add(33, !mul(Size, -1))>.slice in {

To clean this up, I changed it to:

  foreach Index = Indexes<!sub(33, Size)>.slice in {

Only then did I finally realize that there is no subtraction bang operator. So there is now.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90107

Files:
  llvm/docs/TableGen/ProgRef.rst
  llvm/include/llvm/TableGen/Record.h
  llvm/lib/TableGen/Record.cpp
  llvm/lib/TableGen/TGLexer.cpp
  llvm/lib/TableGen/TGLexer.h
  llvm/lib/TableGen/TGParser.cpp
  llvm/lib/Target/AMDGPU/SIRegisterInfo.td
  llvm/test/TableGen/arithmetic.td
  llvm/test/TableGen/math.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90107.300511.patch
Type: text/x-patch
Size: 13476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201024/947e63f8/attachment.bin>


More information about the llvm-commits mailing list