> FWIW, there's probably a missed optimization here - these constant - > constant comparisons could be folded down further.
They are. The issue is when the CSE runs, wants to validate a new instruction with the propagated constant, which will lead to errors as it checks the proper_comaprison_operator, as it hits the assert at the end. Returning zero, it invalidates the instruction change, and the constant comparison will be handled later on by other steps. //Claudiu