Cherry-pick of portions of patch a500ca13933183fa845f09762fc2948fbfe409f1, many shortcut ops added, no functional changes