[PATCH] D25013: [x86][inline-asm][avx512] allow swapping of '{k<num>}' & '{z}' marks
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 08:27:27 PDT 2016
rnk added inline comments.
> delena wrote in X86AsmParser.cpp:1908
> Comments about what this function does.
Oh dear, this is opposite from the convention of the rest of the asmparser. This has exactly one call site and it is local to this file. Do you mind flipping the convention to match the rest of this file and all other asm parsers?
> X86AsmParser.cpp:1884
>
> +// False on failure, true otherwise
> +// If no {z} mark was found - Parser doesn't advance
Please use the asmparser the convention that 'true' represents an error condition. I'm aware that it's surprising, but I want the code to be consistent until someone decides to do a global refactoring.
> X86AsmParser.cpp:1897-1899
> + if (!getLexer().is(AsmToken::RCurly))
> + return !Error(getLexer().getLoc(), "Expected } at this point");
> + Parser.Lex(); // Eat '}'
This can be simplified to:
if (parseToken(AsmToken::RCurly, "expected } at this point"))
return true;
Repository:
rL LLVM
https://reviews.llvm.org/D25013
More information about the llvm-commits
mailing list