[PATCH] D25013: [x86][inline-asm][avx512] allow swapping of '{k<num>}' & '{z}' marks

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 15:23:29 PDT 2016


rnk accepted this revision.
rnk added a comment.

looks good, but I'd recommend using the parse* helpers.



================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1897-1899
+  if (!getLexer().is(AsmToken::RCurly))
+    return !Error(getLexer().getLoc(), "Expected } at this point");
+  Parser.Lex(); // Eat '}'
----------------
rnk wrote:
> This can be simplified to:
>   if (parseToken(AsmToken::RCurly, "expected } at this point"))
>     return true;
Any reason not to do this?


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1933-1935
         if (!getLexer().is(AsmToken::RCurly))
-          return !TokError("Expected } at this point");
+          return TokError("Expected } at this point");
         Parser.Lex();  // Eat "}"
----------------
This is also equivalent to parseToken


Repository:
  rL LLVM

https://reviews.llvm.org/D25013





More information about the llvm-commits mailing list