RISC-V: Fix potential ICE of global vsetvl elimination
Committed for following VSETVL refactor patch to make V2 patch easier to review. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::global_eliminate_vsetvl_insn): Fix potential ICE.
This commit is contained in:
parent
29487eb237
commit
3beef5e6b5
1 changed files with 5 additions and 2 deletions
|
@ -4383,7 +4383,7 @@ pass_vsetvl::global_eliminate_vsetvl_insn (const bb_info *bb) const
|
|||
|
||||
unsigned int bb_index;
|
||||
sbitmap_iterator sbi;
|
||||
rtx avl = get_avl (dem.get_insn ()->rtl ());
|
||||
rtx avl = dem.get_avl ();
|
||||
hash_set<set_info *> sets
|
||||
= get_all_sets (dem.get_avl_source (), true, false, false);
|
||||
/* Condition 2: All VL/VTYPE available in are all compatible. */
|
||||
|
@ -4407,7 +4407,10 @@ pass_vsetvl::global_eliminate_vsetvl_insn (const bb_info *bb) const
|
|||
{
|
||||
sbitmap avout = m_vector_manager->vector_avout[e->src->index];
|
||||
if (e->src == ENTRY_BLOCK_PTR_FOR_FN (cfun)
|
||||
|| e->src == EXIT_BLOCK_PTR_FOR_FN (cfun) || bitmap_empty_p (avout))
|
||||
|| e->src == EXIT_BLOCK_PTR_FOR_FN (cfun)
|
||||
|| (unsigned int) e->src->index
|
||||
>= m_vector_manager->vector_block_infos.length ()
|
||||
|| bitmap_empty_p (avout))
|
||||
return false;
|
||||
|
||||
EXECUTE_IF_SET_IN_BITMAP (avout, 0, bb_index, sbi)
|
||||
|
|
Loading…
Add table
Reference in a new issue