Is there an advantage to keeping separate TERNARY and MOVC ops? Can we just emit TERNARY directly for sm4?
I was thinking turning it to movc/cmp/slt/sge conditionally, and those have different meaning for condition argument.
I don't think I understand. Currently we have OP3_TERNARY which evaluates whether its argument is nonzero, and OP3_MOVC which requires a bool. We could certainly introduce OP3_CMP which is the result of "raising" a sequence like OP2_GEQUAL + OP3_TERNARY, but I don't see why we need OP3_MOVC?