[CodeGen] Enable processing of interconnected complex number operations
authorIgor Kirillov <igor.kirillov@arm.com>
Mon, 27 Mar 2023 16:32:40 +0000 (16:32 +0000)
committerIgor Kirillov <igor.kirillov@arm.com>
Tue, 18 Apr 2023 13:05:49 +0000 (13:05 +0000)
commitc692e87ab8e7d3c7d8e2365572ffb41f6ec9ac1d
tree364a2c30e11ca8ce1dc0ae7ec3badc0ca70b6e0a
parentdc86900ff31e35e61ec9c5adca0488bf33d11833
[CodeGen] Enable processing of interconnected complex number operations

With this patch, ComplexDeinterleavingPass now has the ability to handle
any number of interconnected operations involving complex numbers.
For example, the patch enables the processing of code like the following:

for (int i = 0; i < 1000; ++i) {
    a[i] =  w[i] * v[i];
    b[i] =  w[i] * u[i];
}

This code has multiple arrays containing complex numbers and a common
subexpression `w` that appears in two expressions.

Differential Revision: https://reviews.llvm.org/D146988
llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
llvm/test/CodeGen/AArch64/complex-deinterleaving-multiuses.ll