Why not using something like: ```c enum hlsl_regset regset = (var->data_type->class == HLSL_CLASS_STRUCT ? HLSL_REGSET_NUMERIC : hlsl_type_get_regset(var->data_type)); ``` possibly with a comment?
It seems simpler and it better conveys the fact that variables in SM1 are still essentially considered to have a single regset. Not that your solution is bad.