RISC-V: Simplify codes of changing vsetvl instruction
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Tue, 3 Jan 2023 07:24:36 +0000 (15:24 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Thu, 26 Jan 2023 18:53:01 +0000 (02:53 +0800)
commitaef20243b842284587023306e922e483b2401f34
tree64c9b669ecfbe3fe6ee6e971eb632ea49c611cd1
parent8d8cc482ea49fd6fed81b47c948263fd82a1936b
RISC-V: Simplify codes of changing vsetvl instruction

This patch is NFC patch. I move these code as a function since we will
reuse it in the following patch (Refine phase 3 of VSETVL PASS)

gcc/ChangeLog:

* config/riscv/riscv-vsetvl.cc (change_vsetvl_insn): New function.
(pass_vsetvl::compute_global_backward_infos): Simplify codes.
gcc/config/riscv/riscv-vsetvl.cc