PR target/49263
* config/sh/sh.c (sh_split_treg_set_expr): Invoke emit_insn before
remove_insn.
* config/sh/sh.md (tstsi_t): Don't try to optimize constant with right
shifts if it already fits into K08.
gcc/testsuite/
PR target/49263
* gcc.target/sh/pr49263-4.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220144
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-01-26 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/49263
+ * config/sh/sh.c (sh_split_treg_set_expr): Invoke emit_insn before
+ remove_insn.
+ * config/sh/sh.md (tstsi_t): Don't try to optimize constant with right
+ shifts if it already fits into K08.
+
2015-01-26 Jakub Jelinek <jakub@redhat.com>
PR ipa/64730
fprintf (dump_file, "trailing nott insn %d\n", INSN_UID (nott_insn));
}
+ emit_insn (insnlist.first);
+
if (nott_insn != NULL && append_nott)
{
if (dump_file)
append_nott = false;
}
- emit_insn (insnlist.first);
-
if (append_nott)
nott_insn = emit_insn (gen_nott (get_t_reg_rtx ()));
variant instead and load the constant into a reg. For that we'd need
to do some analysis. */
- if ((op1val & 0xFFFF) == 0
- && CONST_OK_FOR_K08 (op1val >> 16) && optimize_size)
+ if (CONST_OK_FOR_K08 (op1val))
+ {
+ /* Do nothing. */
+ }
+ else if ((op1val & 0xFFFF) == 0
+ && CONST_OK_FOR_K08 (op1val >> 16) && optimize_size)
{
/* Use a swap.w insn to do a shift + reg copy (to R0) in one insn. */
op1val = op1val >> 16;
+2015-01-26 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/49263
+ * gcc.target/sh/pr49263-4.c: New.
+
2015-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/62044
--- /dev/null
+/* Verify that TST #imm, R0 instruction is generated if the constant
+ allows it when compiling for -Os. */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+/* { dg-final { scan-assembler-not "and" } } */
+/* { dg-final { scan-assembler-not "extu" } } */
+/* { dg-final { scan-assembler-not "exts" } } */
+/* { dg-final { scan-assembler-not "shlr" } } */
+
+#include "pr49263.c"