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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 10:35:54 PDT 2025


================
@@ -2870,6 +2871,32 @@ bool MIParser::parseCustomRegisterMaskOperand(MachineOperand &Dest) {
   return false;
 }
 
+bool MIParser::parseLaneMaskOperand(MachineOperand &Dest) {
+  assert(Token.is(MIToken::kw_lanemask));
+
+  lex();
+  if (expectAndConsume(MIToken::lparen))
+    return error("lanemask should begin with '('.");
----------------
jayfoad wrote:

`expectAndConsume` already generates a standard diagnostic like `expected '('`. I don't think your more specific diagnostics add much value.
```suggestion
    return true;
```
Same for the rparen case below. Same for getUint64 below.

Also any remaining error messages should not end with a period.

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


More information about the llvm-commits mailing list