[RISCV] Rewrite isLegalElementTypeForRVV in terms of ValueTypes [nfc]
authorPhilip Reames <preames@rivosinc.com>
Mon, 1 May 2023 14:32:55 +0000 (07:32 -0700)
committerPhilip Reames <listmail@philipreames.com>
Mon, 1 May 2023 14:37:40 +0000 (07:37 -0700)
commitfaa43a80f70c639f40021a175c60857bdcf7cc1f
treeedf3c277882b5bffc394b708ed6f75c65848c632
parent6303fa369c853466106d2140df92a494817840c3
[RISCV] Rewrite isLegalElementTypeForRVV in terms of ValueTypes [nfc]

This was briefly mentioned as a possibility in review discussion on D149369.

One slightly surprising bit to call out - these interfaces can get invoked with non-vector typed arguments. LoopVectorizer likes to call the costing interfaces with scalar types when unrolling, but not vectorizing. I found that surprising, not sure if others do.

Differential Revision: https://reviews.llvm.org/D149462
llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h