diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2016-05-27 11:21:46 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2016-05-27 11:21:46 +0000 |
commit | 4bc72f35f3322302a0672165bc9dc90ca0fc4b97 (patch) | |
tree | 8fa4a8ca09ebd0a344a1c7c9feded6fbd15f7c3a /gcc | |
parent | 0561bcfb825ec512375f06c5b2199d44263832cb (diff) | |
download | gcc-4bc72f35f3322302a0672165bc9dc90ca0fc4b97.zip gcc-4bc72f35f3322302a0672165bc9dc90ca0fc4b97.tar.gz gcc-4bc72f35f3322302a0672165bc9dc90ca0fc4b97.tar.bz2 |
[AArch64] Simplify ashl<mode>3 expander for SHORT modes
* config/aarch64/aarch64.md (ashl<mode>3, SHORT modes):
Use const_int_operand for operand 2 predicate. Simplify expand code
as a result.
From-SVN: r236812
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.md | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b598a4e..2d59cb5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-05-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * config/aarch64/aarch64.md (ashl<mode>3, SHORT modes): + Use const_int_operand for operand 2 predicate. Simplify expand code + as a result. + 2016-05-27 Ilya Enkovich <ilya.enkovich@intel.com> PR middle-end/71279 diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 223a4cc..f04f7da 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -3880,22 +3880,16 @@ (define_expand "ashl<mode>3" [(set (match_operand:SHORT 0 "register_operand") (ashift:SHORT (match_operand:SHORT 1 "register_operand") - (match_operand:QI 2 "nonmemory_operand")))] + (match_operand:QI 2 "const_int_operand")))] "" { - if (CONST_INT_P (operands[2])) - { - operands[2] = GEN_INT (INTVAL (operands[2]) - & (GET_MODE_BITSIZE (<MODE>mode) - 1)); + operands[2] = GEN_INT (INTVAL (operands[2]) & GET_MODE_MASK (<MODE>mode)); - if (operands[2] == const0_rtx) - { - emit_insn (gen_mov<mode> (operands[0], operands[1])); - DONE; - } + if (operands[2] == const0_rtx) + { + emit_insn (gen_mov<mode> (operands[0], operands[1])); + DONE; } - else - FAIL; } ) |