2018-03-02 Jakub Jelinek <jakub@redhat.com>
+ PR target/84614
+ * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
+ prototypes.
+ * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
+ comments.
+ (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
+ * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
+ instead of a loop around prev_real_insn.
+ * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
+ prev_real_insn.
+
PR inline-asm/84625
* config/i386/i386.c (ix86_print_operand): Use conditional
output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
max_match--;
if (max_match == 0)
return false;
- do
- e0_last_head = prev_real_insn (e0_last_head);
- while (DEBUG_INSN_P (e0_last_head));
+ e0_last_head = prev_real_nondebug_insn (e0_last_head);
}
if (max_match == 0)
FROM_LUID and TO_INSN. If so, find it. This is PR83304. */
if (!where_dead || DF_INSN_LUID (where_dead) >= DF_INSN_LUID (to_insn))
{
- rtx_insn *insn = prev_real_insn (to_insn);
+ rtx_insn *insn = prev_real_nondebug_insn (to_insn);
while (insn
&& BLOCK_FOR_INSN (insn) == BLOCK_FOR_INSN (to_insn)
&& DF_INSN_LUID (insn) >= from_luid)
break;
}
- insn = prev_real_insn (insn);
+ insn = prev_real_nondebug_insn (insn);
}
}
return insn;
}
-/* Return the next INSN, CALL_INSN or JUMP_INSN after INSN;
+/* Return the next INSN, CALL_INSN, JUMP_INSN or DEBUG_INSN after INSN;
or 0, if there is none. This routine does not look inside
SEQUENCEs. */
return insn;
}
-/* Return the last INSN, CALL_INSN or JUMP_INSN before INSN;
+/* Return the last INSN, CALL_INSN, JUMP_INSN or DEBUG_INSN before INSN;
or 0, if there is none. This routine does not look inside
SEQUENCEs. */
return insn;
}
+/* Return the next INSN, CALL_INSN or JUMP_INSN after INSN;
+ or 0, if there is none. This routine does not look inside
+ SEQUENCEs. */
+
+rtx_insn *
+next_real_nondebug_insn (rtx uncast_insn)
+{
+ rtx_insn *insn = safe_as_a <rtx_insn *> (uncast_insn);
+
+ while (insn)
+ {
+ insn = NEXT_INSN (insn);
+ if (insn == 0 || NONDEBUG_INSN_P (insn))
+ break;
+ }
+
+ return insn;
+}
+
+/* Return the last INSN, CALL_INSN or JUMP_INSN before INSN;
+ or 0, if there is none. This routine does not look inside
+ SEQUENCEs. */
+
+rtx_insn *
+prev_real_nondebug_insn (rtx_insn *insn)
+{
+ while (insn)
+ {
+ insn = PREV_INSN (insn);
+ if (insn == 0 || NONDEBUG_INSN_P (insn))
+ break;
+ }
+
+ return insn;
+}
+
/* Return the last CALL_INSN in the current list, or 0 if there is none.
This routine does not look inside SEQUENCEs. */
extern rtx_insn *next_nonnote_nondebug_insn_bb (rtx_insn *);
extern rtx_insn *prev_real_insn (rtx_insn *);
extern rtx_insn *next_real_insn (rtx);
+extern rtx_insn *prev_real_nondebug_insn (rtx_insn *);
+extern rtx_insn *next_real_nondebug_insn (rtx);
extern rtx_insn *prev_active_insn (rtx_insn *);
extern rtx_insn *next_active_insn (rtx_insn *);
extern int active_insn_p (const rtx_insn *);
2018-03-02 Jakub Jelinek <jakub@redhat.com>
+ PR target/84614
+ * gcc.dg/pr84614.c: New test.
+
PR inline-asm/84625
* gcc.target/i386/pr84625.c: New test.
--- /dev/null
+/* PR target/84614 */
+/* { dg-do run { target int128 } } */
+/* { dg-options "-Og -fno-split-wide-types -fno-tree-coalesce-vars -g --param=max-combine-insns=3 -fcompare-debug" } */
+
+unsigned __int128 a;
+
+unsigned __int128
+b (unsigned short c, unsigned int d)
+{
+ unsigned long long e;
+ __builtin_sub_overflow (0, d, &e);
+ e >>= c;
+ c ^= 65535;
+ d ^= 824;
+ return c + a + d + e;
+}
+
+int
+main ()
+{
+ unsigned __int128 x = b (0, 9);
+ if (__SIZEOF_INT__ * __CHAR_BIT__ == 32
+ && __SIZEOF_LONG_LONG__ * __CHAR_BIT__ == 64
+ && __SIZEOF_INT128__ * __CHAR_BIT__ == 128
+ && x != (((unsigned __int128) 1 << 64) | 0x10327))
+ __builtin_abort ();
+ return 0;
+}