RISC-V: Fix infinite compilation of VSETVL PASS
This patch fixes issue reported by Jeff. Testing is running. Ok for trunk if I passed the testing with no regression ? gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::emit_vsetvl): Fix inifinite compilation. (pre_vsetvl::remove_vsetvl_pre_insns): Ditto.
This commit is contained in:
parent
d3eac7d96d
commit
d29136ad32
1 changed files with 4 additions and 5 deletions
|
@ -2281,9 +2281,8 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void remove_vsetvl_insn (const vsetvl_info &info)
|
||||
void remove_vsetvl_insn (rtx_insn *rinsn)
|
||||
{
|
||||
rtx_insn *rinsn = info.get_insn ()->rtl ();
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (dump_file, " Eliminate insn %d:\n", INSN_UID (rinsn));
|
||||
|
@ -3231,7 +3230,7 @@ pre_vsetvl::emit_vsetvl ()
|
|||
if (curr_info.delete_p ())
|
||||
{
|
||||
if (vsetvl_insn_p (insn->rtl ()))
|
||||
remove_vsetvl_insn (curr_info);
|
||||
remove_vsetvl_insn (curr_info.get_insn ()->rtl ());
|
||||
continue;
|
||||
}
|
||||
else if (curr_info.valid_p ())
|
||||
|
@ -3269,7 +3268,7 @@ pre_vsetvl::emit_vsetvl ()
|
|||
for (const vsetvl_info &item : m_delete_list)
|
||||
{
|
||||
gcc_assert (vsetvl_insn_p (item.get_insn ()->rtl ()));
|
||||
remove_vsetvl_insn (item);
|
||||
remove_vsetvl_insn (item.get_insn ()->rtl ());
|
||||
}
|
||||
|
||||
/* Insert vsetvl info that was not deleted after lift up. */
|
||||
|
@ -3434,7 +3433,7 @@ pre_vsetvl::remove_vsetvl_pre_insns ()
|
|||
INSN_UID (rinsn));
|
||||
print_rtl_single (dump_file, rinsn);
|
||||
}
|
||||
remove_insn (rinsn);
|
||||
remove_vsetvl_insn (rinsn);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue