This is continuation of D63829 / https://bugs.llvm.org/show_bug.cgi?id=42399
I thought naive pattern would solve my issue, but nope, it involved truncation,
thus more folds needed.. This isn't really the fold i'm interested in,
i need trunc-of-lshr, but i'we decided to start with shl because it's simpler.
In this case, no extra legality checks are needed:
https://rise4fun.com/Alive/CAb
We should be careful about not increasing instruction count,
since we need to produce zext because and is done in wider type.
Can we make the change to use Instruction*/m_Instruction independently (ie as a pre-commit) of this patch?
(I'd be fine without requiring a weird ConstExpr test to prove the diff if that was a possibility.)