[DAGCombiner] Generalize masking of constant rotates.