return NULL;
/* Check pseudo register push first. */
+ machine_mode mode = TARGET_64BIT ? TImode : DImode;
if (REG_P (SET_SRC (set))
&& !HARD_REGISTER_P (SET_SRC (set))
- && push_operand (SET_DEST (set), GET_MODE (SET_DEST (set))))
+ && push_operand (SET_DEST (set), mode))
return set;
df_ref ref;
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -msse4" } */
+/* { dg-require-effective-target sse4} */
+
+typedef unsigned short u16;
+typedef unsigned int u32;
+typedef unsigned char u8;
+
+u32
+__attribute__((__force_align_arg_pointer__))
+unreach(const u16 * pu16, u16 *dst, u32 dstlen, const u8 *src, u32 srclen)
+{
+ for (u32 i = dstlen; srclen && i; i--, srclen--, src++, dst++)
+ {
+ u16 off = pu16[*src];
+ if (off)
+ {
+ src++; srclen--;
+ *dst = pu16[off + *src];
+ }
+ }
+ return 56;
+}
+
+u32
+__attribute__((__force_align_arg_pointer__))
+__attribute__((noipa))
+bug(const u16 * pu16, u16 *dst, u32 dstlen, const u8 *src, u32 srclen)
+{
+ if (pu16)
+ /* Branch should not execute, but stack realignment
+ * reads wrong 'pu16' value from stack. */
+ return unreach(pu16, dst, dstlen, src, srclen);
+
+ return (srclen < dstlen) ? srclen : dstlen;
+}
+
+int
+main()
+{
+ if (__builtin_cpu_supports ("sse4.1"))
+ {
+ /* Should return 12 */
+ if (bug(0, 0, 12, 0, 34) != 12)
+ __builtin_abort ();
+ }
+ return 0;
+}