The list slice suffix with a single index is supposed to produce the specified list element. For example:
[0, 1, 2, 3, 4, 5] [3] => 3
This works fine except when the list is a literal (as above) or a defvar, in which case it currently produces a list of the single element:
[0, 1, 2, 3, 4, 5] [3] => [3]
This revision fixes this bug so that everything is consistent. I can find no TableGen files that depend on the inconsistency. I wrote a more comprehensive test.
Where's the code that already supports the non-literal case? Is there any chance of collapsing these two cases together?