Given pattern:
(x shiftopcode Q) shiftopcode K
we should rewrite it as
x shiftopcode (Q+K) iff (Q+K) u< bitwidth(x)
This is valid for any shift, but they must be identical.
- https://rise4fun.com/Alive/9E2
- exact on both lshr => exact https://rise4fun.com/Alive/plHk
- exact on both ashr => exact https://rise4fun.com/Alive/QDAA
- nuw on both shl => nuw https://rise4fun.com/Alive/5Uk
- nsw on both shl => nsw https://rise4fun.com/Alive/0plg
Should fix PR42391.