[ARC] Fix unwanted match for sign extend 16-bit constant.
authorClaudiu Zissulescu <claziss@synopsys.com>
Fri, 29 Apr 2016 08:39:22 +0000 (10:39 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Fri, 29 Apr 2016 08:39:22 +0000 (10:39 +0200)
commit7132ae191b105c7b2038dd842c391d0b414bc8b2
tree836c273f4dc60988425a41f3115b2d866f428521
parent98998245d99f06946b4d5ed6744c77c3760f1141
[ARC] Fix unwanted match for sign extend 16-bit constant.

The combine pass may conclude umulhisi3_imm pattern can accept also sign
extended 16-bit constants. This patch prohibits the combine in considering
this pattern as suitable.

gcc/
2016-04-29  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.h (UNSIGNED_INT12, UNSIGNED_INT16): Define.
* config/arc/arc.md (umulhisi3): Use arc_short_operand predicate.
(umulhisi3_imm): Update predicates and constraint letters.
(umulhisi3_reg): Declare instruction as commutative.
* config/arc/constraints.md (J12, J16): New constraints.
* config/arc/predicates.md (short_unsigned_const_operand): New
predicate.
(arc_short_operand): Likewise.
* testsuite/gcc.target/arc/umulsihi3_z.c: New file.

From-SVN: r235623
gcc/ChangeLog
gcc/config/arc/arc.h
gcc/config/arc/arc.md
gcc/config/arc/constraints.md
gcc/config/arc/predicates.md
gcc/testsuite/gcc.target/arc/umulsihi3_z.c [new file with mode: 0644]