[llvm] [AMDGPU] Add AMDGPU specific variadic operation MCExprs (PR #82022)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 00:07:07 PST 2024


================
@@ -8130,6 +8132,53 @@ void AMDGPUAsmParser::onBeginOfFile() {
     getTargetStreamer().EmitDirectiveAMDGCNTarget();
 }
 
+/// Parse AMDGPU specific expressions.
+///
+///  expr ::= or(expr, ...) |
+///           max(expr, ...)
+///
+bool AMDGPUAsmParser::parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
+  using AGVK = AMDGPUVariadicMCExpr::AMDGPUVariadicKind;
+
+  auto parseVariadicExpr = [&](AGVK Kind, const MCExpr *&res, SMLoc &EndLoc) {
----------------
Pierre-vh wrote:

`CamelCase` for both `res` and the lambda name

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


More information about the llvm-commits mailing list