[ISEL] Canonicalize STEP_VECTOR to LHS if RHS is a splat.
authorSander de Smalen <sander.desmalen@arm.com>
Thu, 3 Feb 2022 08:59:49 +0000 (08:59 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Thu, 3 Feb 2022 09:31:46 +0000 (09:31 +0000)
commit01bfe9729a9812c8dcdb8f239bce23bb10637ea8
treefea1f023ddef2c731c622b145aed8fdccc0ef478
parent78bf2e0a3f5f6eb5c5471ab98fee8b4325b91cd6
[ISEL] Canonicalize STEP_VECTOR to LHS if RHS is a splat.

This helps recognise patterns where we're trying to match STEP_VECTOR
patterns to INDEX instructions that take a GPR for the Start/Step.

The reason for canonicalising this operation to the LHS is
because it will already be canonicalised to the LHS if the RHS
is a constant splat vector.

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D118459
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/AArch64/active_lane_mask.ll
llvm/test/CodeGen/AArch64/sve-stepvector.ll