[RISCV][InsertVSETVLI] Move vmv.s.x SEW check into getDemandedBits. NFC
authorLuke Lau <luke@igalia.com>
Fri, 26 May 2023 12:58:04 +0000 (12:58 +0000)
committerLuke Lau <luke@igalia.com>
Wed, 31 May 2023 17:18:44 +0000 (18:18 +0100)
commit257cc049f98ca04236923c28007253944d47c439
treebcb0f52af190523983f40f682342c49178a38f51
parent5bb06924657332cf35c11840c4a14acb86536fd4
[RISCV][InsertVSETVLI] Move vmv.s.x SEW check into getDemandedBits. NFC

This patch restructures the logic that checks if vmv.s.x's SEW can be
expanded into getDemandedBits, so that it can be shared by both the
top-to-bottom and bottom-to-top passes.

It adds a third option for SEW in DemandedFields, that's weaker than
demanded but stronger than not demanded, that states that it the new SEW
must be greater than or equal to the current SEW.

Note that we now need to take care of the order of operands in
areCompatibleVTYPEs as the relation is no longer commutative.

A later patch will remove the gating on the bottom-to-top pass
(dolocalPostpass) and another one will relax the demands on the tail
policy further.
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp