This patch simplifies pattern (xxswap (vec-op (xxswap a) (xxswap b))) into (vec-op a b) if vec-op is lane-insensitive. The motivating case is ScalarToVector-VecOp-ExtractElement sequence on LE, but the peephole itself is not related to endianness, so BE may also benefit from this.
The changed case is diffed for easier review. Remove that part when applying this patch.
Since the conditions are non-trivial to parse in one's head, a quick and helpful comment goes a long way: