This fixes a fallout that actually goes back to 5.0 but went unnoticed.
commit50c6dd20ce5e777e96de24ea6a1a896cf8836931
authorOleg Endo <olegendo@gcc.gnu.org>
Sun, 25 Sep 2016 06:59:37 +0000 (25 06:59 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Sun, 25 Sep 2016 06:59:37 +0000 (25 06:59 +0000)
tree69658dc6948bcfd9cfb05d59758237eca0527549
parenteaaa68f33d943f9714e48d5f81d96e364bb77054
This fixes a fallout that actually goes back to 5.0 but went unnoticed.

The costs for movt and movrt type of insns were not correctly reported
and ifcvt thus made some bad choices for SH.  A new cset_zero pattern
variant is also required to fix the matching for some recent changes
in the middle end.

gcc/
PR target/51244
* config/sh/sh.c (sh_movt_set_dest, sh_movrt_set_dest): Add overloads.
(sh_rtx_costs): Handle SET of movt and movrt patterns.
* cnofig/sh/sh-protos.h (sh_movt_set_dest, sh_movrt_set_dest): Forward
declare new overloads.
* config/sh/sh.md (*cset_zero): Add variant that takes a treg_set_expr
operand.

gcc/testsuite/
PR target/51244
* gcc.target/sh/pr51244-11.c: Add more detailed expected insn matching.

From-SVN: r240471
gcc/ChangeLog
gcc/config/sh/sh-protos.h
gcc/config/sh/sh.c
gcc/config/sh/sh.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/sh/pr51244-11.c