[MVE] Don't distribute add of vecreduce if it has more than one use
authorJohn Brawn <john.brawn@arm.com>
Fri, 8 Jul 2022 10:12:38 +0000 (11:12 +0100)
committerJohn Brawn <john.brawn@arm.com>
Mon, 11 Jul 2022 13:13:29 +0000 (14:13 +0100)
commitddd9485129b53a1ca53ebe06f59dd3c7fe2dc333
treec589e799c6644ea597c5299d239fcc001675c085
parentd507e8b70e4668f891d5df03f966c154cc4d5370
[MVE] Don't distribute add of vecreduce if it has more than one use

If the add has more than one use then applying the transformation
won't cause it to be removed, so we can end up applying it again
causing an infinite loop.

Differential Revision: https://reviews.llvm.org/D129361
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-vecreduce-add-combine.ll [new file with mode: 0644]