[PATCH] D89217: [AMDGPU] Base getSubRegFromChannel on TableGen data

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 07:10:04 PDT 2020


Flakebi added a comment.

Looks good, I have one comment.



================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:88-89
+  static auto InitializeSubRegFromChannelTableOnce = [this]() {
+    memset(SubRegFromChannelTable, AMDGPU::NoRegister,
+           sizeof(SubRegFromChannelTable) / sizeof(uint16_t));
+    for (uint16_t Idx = 1; Idx < getNumSubRegIndices(); ++Idx) {
----------------
I think this should be just `sizeof(SubRegFromChannelTable)`.
The previous code used `AMDGPU::NoSubRegister` instead of `NoRegister` (both are zero so technically there is no difference).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89217/new/

https://reviews.llvm.org/D89217



More information about the llvm-commits mailing list