[PATCH] D99743: [AMDGPU] Use enum for flat variants. NFC

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 02:45:25 PDT 2021


foad added a comment.

Incidentally I think it would be simpler if AMDGPU::getNumFlatOffsetBits did not take a "signed" argument, always returned the total number of bits in the field, and it was the caller's responsibility to worry about whether negative offsets are allowed or not.



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1667
+      FlatVariant == SIInstrFlags::FLAT &&
+      (AS == AMDGPUAS::FLAT_ADDRESS || AS == AMDGPUAS::GLOBAL_ADDRESS);
+
----------------
Does this fix a real bug when AS == AMDGPUAS::GLOBAL_ADDRESS? If so it could do with a test case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99743



More information about the llvm-commits mailing list