[LV] Add users to recurrence tests to make sure they are not removable.
authorFlorian Hahn <flo@fhahn.com>
Mon, 17 Apr 2023 10:56:56 +0000 (11:56 +0100)
committerFlorian Hahn <flo@fhahn.com>
Mon, 17 Apr 2023 10:56:56 +0000 (11:56 +0100)
commita0d667b89bfe219d8c9842081c2f7d7e3556010b
tree9fb254fe5c448ccac8336585eae3777f18b47fcc
parent8cdca966902a5af9c28b5f6fb8602b22a07808a1
[LV] Add users to recurrence tests to make sure they are not removable.

This ensures VPlan-based DCE won't be able to remove the unused
recurrences.

It also adds a dedicated new test (@unused_recurrence) where an unused
recurrence can be removed.
llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
llvm/test/Transforms/LoopVectorize/scalable-first-order-recurrence.ll