I think I agree, but I don't see how this is actionable in this MR in particular.
Mostly just that I don't like to see more lowering code introduced.
What I'd do here is either:
* make the abs/neg conditional on the type being non-bool,
* change pass order or duplicate passes such that lower_nonfloat_exprs() happens after lower_ternary(),
And either:
* always cast to bool when creating HLSL_OP3_TERNARY (which implies getting rid of that abs/neg entirely), or
* assert that HLSL_OP3_TERNARY has an implicit cast to bool, and hence stop casting to bool when we don't need to.