[NFC][RISCV] Move calculations of SDNode policy operand idx to a separate function
authorAnton Sidorenko <anton.sidorenko@syntacore.com>
Tue, 20 Sep 2022 17:22:16 +0000 (10:22 -0700)
committerShihPo Hung <shihpo.hung@sifive.com>
Tue, 20 Sep 2022 17:36:47 +0000 (10:36 -0700)
commit3cd503f181612364e099f1f3d921fe95a5f38070
treea4fab44f40ba34c552162d88f5b86d6e370b2d05
parenteda2af575fdf038f3508112b42845516e7cb6192
[NFC][RISCV] Move calculations of SDNode policy operand idx to a separate function

Since there is no guaranteed correspondence of SDNode and MI operands, we need
getters simular to RISCVII::get*OpNum for SDNodes.

More uses of getVecPolicyOpIdx will be added in D130895.

Reviewed By: craig.topper, arcbbb

Differential Revision: https://reviews.llvm.org/D134179
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp