[llvm] [CodeGen] Add laneBitmask as new MachineOperand type, utilised by newly defined COPY_LANEMASK instruction (PR #151944)

Vikash Gupta via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 23:37:11 PDT 2025


================
@@ -807,6 +807,19 @@ For an int eq predicate ``ICMP_EQ``, the syntax is:
 
    %2:gpr(s32) = G_ICMP intpred(eq), %0, %1
 
+Lanemask Operands
+^^^^^^^^^^^^^^^^^^
+
+A Lanemask operand is 64-bit unsigned value that holds the lane information 
+corrseponding to the source register operand in the instruction.
----------------
vg0204 wrote:

> I think you need to abstract this whole concept a bit more, since this document is target-independent, and many targets don't have hidden lanes like AMDGPU does. Are you planning to use these in any target-independent passes? If not, then we might get away with smth hand-wavy like "the interpretation of lanemasks is up to each target", but otherwise I think you'll need to be more specific about how this behaves.

Will put the details in the RFC as asked by JayFoad

https://github.com/llvm/llvm-project/pull/151944


More information about the llvm-commits mailing list