[llvm] [RISCV] Move RISCVInsertVSETVLI to after phi elimination (PR #91440)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 08:22:01 PDT 2024


================
@@ -1176,9 +1176,9 @@ define void @sink_splat_ashr_scalable(ptr nocapture %a) {
 ; CHECK-NEXT:    andi a3, a1, 1024
 ; CHECK-NEXT:    xori a1, a3, 1024
 ; CHECK-NEXT:    slli a4, a4, 1
-; CHECK-NEXT:    vsetvli a5, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    mv a5, a0
----------------
lukel97 wrote:

Woops, your reply came in as I was typing my comment so I didn't see it, I agree we should follow up on this. I did try inducing a spill in a local test case and I was surprised to see that the scheduler doesn't actually move the vsetvli to avoid the spill. And I presume this is not specific to vsetvlis but for any dead def.

https://github.com/llvm/llvm-project/pull/91440


More information about the llvm-commits mailing list