@@ -2633,13 +2633,16 @@ pre_vsetvl::compute_lcm_local_properties ()
if (!info.has_nonvlmax_reg_avl () && !info.has_vl ())
continue;
- unsigned int regno;
- sbitmap_iterator sbi;
- EXECUTE_IF_SET_IN_BITMAP (m_reg_def_loc[bb->index ()], 0, regno,
- sbi)
+ if (info.has_nonvlmax_reg_avl ())
{
- if (regno == REGNO (info.get_avl ()))
- bitmap_clear_bit (m_transp[bb->index ()], i);
+ unsigned int regno;
+ sbitmap_iterator sbi;
+ EXECUTE_IF_SET_IN_BITMAP (m_reg_def_loc[bb->index ()], 0,
+ regno, sbi)
+ {
+ if (regno == REGNO (info.get_avl ()))
+ bitmap_clear_bit (m_transp[bb->index ()], i);
+ }
}
for (const insn_info *insn : bb->real_nondebug_insns ())
new file mode 100644
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O2 -Wno-implicit-int" } */
+
+char *a;
+b() {
+ int c[2];
+ int d = 0;
+ for (; d < 16; d += 2)
+ c[d / 2] = a[d | 1];
+ if (c[0])
+ for (;;)
+ ;
+}