[ARM] Fix incorrect assignment of Changed variable in MVEGatherScatterLowering::optim...
authorCraig Topper <craig.topper@sifive.com>
Tue, 29 Jun 2021 23:21:26 +0000 (16:21 -0700)
committerCraig Topper <craig.topper@sifive.com>
Wed, 30 Jun 2021 14:52:57 +0000 (07:52 -0700)
commit0f1f92156f3caafe9567b853ecb57212b709e68d
tree5bbb9ed0c33f1c06f0fe1613d0dfcdba1f9d76c3
parentfec521a7b206815ad995f7247e671a8f25d144fc
[ARM] Fix incorrect assignment of Changed variable in MVEGatherScatterLowering::optimiseOffsets.

I believe this Changed flag should be initialized to false,
otherwise the if (!Changed) is always dead. This doesn't
manifest in a functional issue because the PHINode checks will
fail if nothing changed. They are identical to the earlier
checks that must have already failed to get into this else block.

While there remove an else after return to reduce indentation.

Differential Revision: https://reviews.llvm.org/D105159
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp