[PATCH] D125703: [RISCV] Fix missing vsetvli in transparent block case

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 10:51:21 PDT 2022


reames marked an inline comment as done.
reames added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll:30
 ; CHECK-NEXT:    vfadd.vv v8, v8, v9
+; CHECK-NEXT:    vsetvli zero, a0, e64, m1, ta, mu
 ; CHECK-NEXT:    ret
----------------
craig.topper wrote:
> Does this mean that ExitInfo and CurInfo don't match at the end? Why did that occur? There's nothing that has any special cases in this function.
> 
> Is it because of the AVL being from a vsetvli?
It's because the AVL on the abstract state is technically not equal.  They both represent the same runtime value, but the first state has an AVL of a0, the vfsub produces one with an AVL of x0 (vlmax).  This is due to my recently introduce prepass which creates this canonicalization.

We could pretty easily fix this with a minor improvement to insertVSETVLI, but given the following patch immediately reverses this, I left it to avoid complicating the patch series further.  :)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125703/new/

https://reviews.llvm.org/D125703



More information about the llvm-commits mailing list