+2014-06-18 Andreas Schwab <schwab@suse.de>
+
+ PR rtl-optimization/54555
+ * postreload.c (move2add_use_add2_insn): Substitute
+ STRICT_LOW_PART only if it is cheaper.
+
2014-06-18 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*sibcall_memory): Rename from *sibcall_intern.
gen_rtx_STRICT_LOW_PART (VOIDmode,
narrow_reg),
narrow_src);
- changed = validate_change (insn, &PATTERN (insn),
- new_set, 0);
- if (changed)
- break;
+ get_full_set_rtx_cost (new_set, &newcst);
+ if (costs_lt_p (&newcst, &oldcst, speed))
+ {
+ changed = validate_change (insn, &PATTERN (insn),
+ new_set, 0);
+ if (changed)
+ break;
+ }
}
}
}
+2014-06-18 Andreas Schwab <schwab@suse.de>
+
+ PR rtl-optimization/54555
+ * gcc.target/m68k/pr54555.c: New test.
+
2014-06-18 Olivier Hainque <hainque@adacore.com>
* gnat.dg/blocklocs.adb: New test.
--- /dev/null
+/* PR rtl-optimization/54555
+ Test that postreload does not shorten the load of small constants to
+ use move.b instead of moveq. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "move\\.?b" } } */
+
+void foo (void);
+void bar (int a)
+{
+ if (a == 16 || a == 23) foo ();
+ if (a == -110 || a == -128) foo ();
+}