On Mon Nov 20 10:40:13 2023 +0000, Giovanni Mascellani wrote:
Here the previous index of the register is replaced rather than added. So code like this:
%1 = some global address %2 = GEP %1, 2 %3 = GEP %2, 3
will have `%3` initialized at 3 elements inside the global rather then 5. Is that intended? Maybe it would make sense to emit a warning if a situation like `%3` happens? Or to simply add the offset? Also, do we already have a way to have pointers to structs? `sm6_parser_declare_global()` allows us to declare arrays of scalars, but right now I don't remember anything about structs.
A GEP on the result of another never occurs, but AFAIK it's not invalid. I added a check for it.
Yes I think pointers to structs do not occur in DXIL, so I deleted that check.