The DAG combiner can recognize a pattern of ORed shifts that evaluate to a bit rotation. When the rotation is ORed with another value, the OR operations can get reassociated in such a way that the rotation will no longer be identified.Implement default legalization of rotates: either in terms of the rotation in the opposite direction (if legal), This patch implements a more aggressive analysior in terms of OR operations to detect rotation patternsshifts and ors.
Implement generating of rotate instructions for Hexagon. Hexagon only supports rotates by an immediate value, so implement custom lowering of ROTL/ROTR on Hexagon. If a rotate is not legal, use the (provided) default expansion into shifts and ORion.