There are 3 independent changes here, but I thought it would be easier to review one patch to handle them all. If it's better to review and/or commit separately, please let me know:
- Account for multiple uses in the pattern matching: avoid the transform if it increases the instruction count.
- Add a missing fold for the case where the numerator is the constant: http://rise4fun.com/Alive/E2p
- Enable all folds for vector types.
There's still one more potential change - use "shouldChangeType()" to keep from transforming to an illegal integer type.
This is allowing arbitrary constant expressions through. Is that we want?