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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 08:31:37 PDT 2020


arsenm added inline comments.


================
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) {
----------------
Flakebi wrote:
> 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).
Yes, this should be NoSubregister 


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