[PATCH] D39616: [AMDGPU] Remove hardcoded address space value from AMDGPULibFunc

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 14:10:32 PDT 2017


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPULibFunc.cpp:463
+    case E_CONSTPTR_SWAPGL: {
+      unsigned AS = AMDGPULibFunc::getAddrSpaceFromEPtrKind(P.PtrKind & AMDGPULibFunc::ADDR_SPACE);
+      switch (AS) {
----------------
Why not to mask argument inside getAddrSpaceFromEPtrKind?


================
Comment at: lib/Target/AMDGPU/AMDGPULibFunc.cpp:598
+    unsigned AS;
     if (!eatTerm(param, "U3AS")) {
+      AS = 0;
----------------
It changes meaning of the function signature. This shall be fine as long as library matches the expectations. Does it match?


https://reviews.llvm.org/D39616





More information about the llvm-commits mailing list