Why does std.dim not accept global constants as arguments?


While writing some code, I discovered that std.dim does not accept global arguments.
In particular, I cannot write std.dim %1, %2 with the position argument %2 being a global constant. Is there a fundamental reason to this?


What do you mean by a “global constant”? std.dim takes two SSA values that obey usual dominance rules, i.e. they must be defined in the same isolated-from-above region (e.g., a function) before being used.