[PATCH] D81651: [AMDGPU][CODEGEN] Added support of new inline assembler constraints

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 10:43:11 PDT 2020


dp marked 4 inline comments as done.
dp added inline comments.


================
Comment at: llvm/docs/LangRef.rst:4151
+- ``J``: A 16-bit signed integer constant.
+- ``L``: A 15-bit unsigned integer constant.
 - ``A``: An integer or a floating-point inline constant.
----------------
arsenm wrote:
> This one is weird; we don't actually have any of these instructions?
Sure, we do not have anything like this in AMDGPU ISA encodings and I'm not sure how useful this constraint would be. However we should probably support it for the sake of compatibility with GCC. 


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:11065
+    unsigned UnusedBits = 64 - Size;
+    Val = (Val << UnusedBits) >> UnusedBits;
+  }
----------------
arsenm wrote:
> Val & maskTrailingOnes(Size) might be clearer
Thanks! I was sure there is a function for this purpose in llvm libraries but was unable to find it. The name sounds a bit cryptic.


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

https://reviews.llvm.org/D81651





More information about the llvm-commits mailing list