[InterleaveAccess] Check that binop shuffles have an undef second operand
authorDavid Green <david.green@arm.com>
Fri, 31 Mar 2023 14:38:27 +0000 (15:38 +0100)
committerDavid Green <david.green@arm.com>
Fri, 31 Mar 2023 14:38:27 +0000 (15:38 +0100)
commit7b6fae42f7046d27218d724892963377b2acfd45
tree0b035cda98a454d3cf7e07458cfc8d710b6cff73
parent6261adfa51f2d93c8258e7b2d9811d607f3e50a5
[InterleaveAccess] Check that binop shuffles have an undef second operand

It is expected that shuffles that we hoist through binops only have a single
vector operand, the other being undef/poison. The checks for
isDeInterleaveMaskOfFactor check that all the elements come from inside the
first vector, but with non-canonical shuffles the second operand could still
have a value. Add a quick check to make sure it is UndefValue as expected, to
make sure we don't run into problems with BinOpShuffles not using BinOps.

Fixes #61749

Differential Revision: https://reviews.llvm.org/D147306
llvm/lib/CodeGen/InterleavedAccessPass.cpp
llvm/test/Transforms/InterleavedAccess/AArch64/binopshuffles.ll