[RISCV] Refactor getDefaultVLOps. NFC.
authorHan-Kuan Chen <hankuan.chen@sifive.com>
Mon, 14 Nov 2022 03:08:46 +0000 (19:08 -0800)
committerHan-Kuan Chen <hankuan.chen@sifive.com>
Wed, 16 Nov 2022 02:11:11 +0000 (18:11 -0800)
commitaa47bfa9bcfac8b537b70ac8151561da32fec542
tree3fedf55292075645928bfaf2ae333b3306fa3deb
parent5d19fea81fc2352100916e04e45adf5650b113f6
[RISCV] Refactor getDefaultVLOps. NFC.

Current getDefaultVLOps can only deduce VL from a MVT. However,
sometimes users have already known VL value. This commit will provide a
uniform interface to get VL instead of calling DAG.getConstant.

Differential Revision: https://reviews.llvm.org/D138003
llvm/lib/Target/RISCV/RISCVISelLowering.cpp