[llvm] [RISCV] Move RISCVInsertVSETVLI to after phi elimination (PR #91440)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri May 10 00:00:53 PDT 2024
================
@@ -1155,8 +1155,8 @@ define void @mulhu_v8i16(ptr %x) {
; CHECK-NEXT: vle16.v v8, (a0)
; CHECK-NEXT: vmv.v.i v9, 0
; CHECK-NEXT: lui a1, 1048568
-; CHECK-NEXT: vsetvli zero, zero, e16, m1, tu, ma
; CHECK-NEXT: vmv.v.i v10, 0
----------------
lukel97 wrote:
Ah it actually looks for the last vsetvli to see if the SEW/VTYPE matches in `isConvertibleToVMV_V_V`. Thanks for the explanation, it makes sense to me now. The `vmv.v.i v10, 0` is a copy of the `vmv.v.i v9, 0` above. And because the `vmv.v.i v9, 0` has a TA policy, RISCVInstrInfo::copyPhysRegVector can insert the `vmv.v.i 10, 0` in either a TU or TA policy.
https://github.com/llvm/llvm-project/pull/91440
More information about the llvm-commits
mailing list