https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118936

--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
Also wrong is this part:

+static void
+ix86_find_all_reg_use_1 (rtx set, HARD_REG_SET &stack_slot_access,
+                        auto_bitmap &worklist)
+{
+  rtx dest = SET_DEST (set);
+  if (!REG_P (dest))
+    return;
+
+  rtx src = SET_SRC (set);
+  if (MEM_P (src) || CONST_SCALAR_INT_P (src))
+    return;
+
+  if (TEST_HARD_REG_BIT (stack_slot_access, REGNO (dest)))
+    return;
+
+  /* Add this register to stack_slot_access.  */
+  add_to_hard_reg_set (&stack_slot_access, Pmode, REGNO (dest));
+  bitmap_set_bit (worklist, REGNO (dest));
+}

The above will be triggered for e.g. cx:DI = ZERO_EXTEND([bp:DI+0x20]). We want
to ignore all memory access in the RTX.

Reply via email to