[Mlir-commits] [mlir] [MLIR][DRR] Fix inconsistent operand and arg index usage (PR #139816)
Xiaomin Liu
llvmlistbot at llvm.org
Wed May 14 08:30:38 PDT 2025
================
@@ -715,7 +715,7 @@ void PatternEmitter::emitOperandMatch(DagNode tree, StringRef opName,
// Capture the value
// `$_` is a special symbol to ignore op argument matching.
if (!argName.empty() && argName != "_") {
- auto res = symbolInfoMap.findBoundSymbol(argName, tree, op, operandIndex,
+ auto res = symbolInfoMap.findBoundSymbol(argName, tree, op, argIndex,
----------------
xl4624 wrote:
The docstring for `SymbolInfoMap` refers to this as an operand index, but from a little bit of research they actually get treated as an `argIndex` instead I think. Some examples I found:
https://github.com/llvm/llvm-project/blob/c5331276cb24209f3e13a232d7b81c4e62c3fbd6/mlir/lib/TableGen/Pattern.cpp#L303-L305
https://github.com/llvm/llvm-project/blob/c5331276cb24209f3e13a232d7b81c4e62c3fbd6/mlir/lib/TableGen/Pattern.cpp#L452-L455
https://github.com/llvm/llvm-project/pull/139816
More information about the Mlir-commits
mailing list