I don't think special casing specific values adds much, but by itself, using ARB_shader_bit_encoding when available wouldn't be a bad thing. Note that we do something very similar for immediate values in shader_glsl_get_register_name(). The specific issue there was related to specifying floating-point specials like +/-INF or NaN.