Currently generateOverflowCheck always creates code for Step being
negative and positive, followed by a select at the end depending on
Step's sign.
This patch updates the code to only create either the checks for step
being positive or negative, if the sign is known.
Follow-up to D116696.
These checks seem redundant. You should be able to use !isKnownNegative and !isKnownPositive unless I'm missing something?