Address comments:
https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628568.html 




juzhe.zh...@rivai.ai
 
From: Kito Cheng
Date: 2023-08-28 16:58
To: Robin Dapp
CC: Juzhe-Zhong; gcc-patches; kito.cheng
Subject: Re: [PATCH] RISC-V: Disable user vsetvl fusion into EMPTY block
Is it possible to skip that at the topper level like that?
 
diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index 682f795c8e1..654d25de593 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -3269,7 +3269,7 @@ pass_vsetvl::earliest_fusion (void)
      for (size_t i = 0; i < m_vector_manager->vector_exprs.length (); i++)
       {
         auto &expr = *m_vector_manager->vector_exprs[i];
-         if (expr.empty_p ())
+         if (expr.empty_p () || vsetvl_insn_p (expr.get_insn ()->rtl ()))
           continue;
         edge eg = INDEX_EDGE (m_vector_manager->vector_edge_list, ed);
         if (eg->src == ENTRY_BLOCK_PTR_FOR_FN (cfun)
 

Reply via email to