[llvm] [CodeGen] Add MO_LaneMask type and a new COPY_LANEMASK instruction (PR #151944)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 05:08:17 PST 2025


================
@@ -114,6 +114,12 @@ HANDLE_TARGET_OPCODE(REG_SEQUENCE)
 /// used to copy between subregisters of virtual registers.
 HANDLE_TARGET_OPCODE(COPY)
 
+/// COPY_LANEMASK - Target-independent partial register copy. The laneMask
+/// operand indicates which parts of the source register are copied to the
+/// destination. Other parts of the destination are undefined. It does not
+/// support copy between subregisters of virtual registers.
----------------
cdevadas wrote:

This comment says it doesn't support COPY between subregs of virtual registers. But you mentioned in a comment that it is extended to work on both Physical and Virtual registers. If that is true, you should fix this comment.

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


More information about the llvm-commits mailing list