[InstCombine] convert lshr to ashr to eliminate cast op
This is similar to b865eead ( D103617 ) and fixes: https://llvm.org/PR50575 41b71f71 did this and more (noted with TODO comments in the tests), but it didn't handle the case where the destination is narrower than the source, so it got reverted. This is a simple match-and-replace. If there's evidence that the TODO cases are useful, we can revisit/extend.
Loading
Please sign in to comment