[SVE][AArch64TTI] Fix invalid mla combine that miscomputes the value of inactive...
authorPaul Walker <paul.walker@arm.com>
Sat, 17 Jun 2023 16:51:49 +0000 (17:51 +0100)
committerPaul Walker <paul.walker@arm.com>
Sun, 18 Jun 2023 12:07:03 +0000 (13:07 +0100)
commitb7287a82d33b6cd1760ac7e399ba92ae52057b5d
treefd2bef19cdacc371d591eef3d2a6aa9548e0aa0f
parentc7c71aa123fdeb520b419ac7daca239902a792ac
[SVE][AArch64TTI] Fix invalid mla combine that miscomputes the value of inactive lanes.

Consider: add(pg, a, mul_u(pg, b, c))

Although the multiply's inactive lanes are undefined, they don't
contribute to the final result.  The overall result of the inactive
lanes come from "a" and thus the above is another form of mla
rather than mla_u.
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-muladdsub.ll