We have a trunc/(shlThis combine only handled left shifts, srl,but now it can handle right shifts as well. sra) combine in the DAG.
The SHL is already handled by a generic combinIt handles right shifts conservatively and only truncates them to the size returned by TLI.
AMDGPU benefits from always lowering shifts to 32 bits for instance, but there was no combine for right-shiftsAArch64 would rather keep them at 64 bits.