[llvm] [TableGen] Add let append/prepend syntax for field concatenation (PR #182382)
Henrich Lauko via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 22 11:47:06 PST 2026
xlauko wrote:
> Nice. This is something I've wanted before. Does it also work with nesting top-level `let appending X in {`? Maybe that needs a testcase? This would help for nesting `Predicates` definitions for instructions/patterns
@lenary Do you mean something like:
```
class Base {
list<int> items = [1, 2];
}
// Test nested top-level let append.
let append items = [100] in {
let append items = [200] in {
// CHECK: def NestedTopLevel
// CHECK: list<int> items = [1, 2, 100, 200];
def NestedTopLevel : Base;
}
}
```
This already works and is tested, though has, at least for my taste, a bit weird semantics dut to TableGen execution, so outer most append is applied first.
https://github.com/llvm/llvm-project/pull/182382
More information about the llvm-commits
mailing list