[InstCombine] Avoid uses of ConstantExpr::getCast()

Add a generalized getLosslessTrunc() helper to simplify this.

GitOrigin-RevId: 6ce7461eeab7a7ca7496518184a79361c5e05c5e
4 files changed