diff options
author | DJ Delorie <dj@redhat.com> | 2016-04-25 07:59:44 -0400 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2016-04-25 11:59:44 +0000 |
commit | 9c8a71e668a436268fcca79295e2bfcbc75d1206 (patch) | |
tree | 5ffa55e1828e01e88a9517a5e889ca857b5df910 /gcc/config/msp430 | |
parent | 2de1cf8c4ba5a043ea3d0a3998cd789cc3d8b9f5 (diff) | |
download | gcc-9c8a71e668a436268fcca79295e2bfcbc75d1206.zip gcc-9c8a71e668a436268fcca79295e2bfcbc75d1206.tar.gz gcc-9c8a71e668a436268fcca79295e2bfcbc75d1206.tar.bz2 |
msp430.md (ashlhi3): Optimize one bit shifts.
* config/msp430/msp430.md (ashlhi3): Optimize one bit shifts.
(ashrhi3): Likewise.
(lshrhi3): Likewise.
From-SVN: r235410
Diffstat (limited to 'gcc/config/msp430')
-rw-r--r-- | gcc/config/msp430/msp430.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/msp430/msp430.md b/gcc/config/msp430/msp430.md index 4df4970..abab672 100644 --- a/gcc/config/msp430/msp430.md +++ b/gcc/config/msp430/msp430.md @@ -756,6 +756,9 @@ && REG_P (operands[1]) && CONST_INT_P (operands[2])) emit_insn (gen_430x_shift_left (operands[0], operands[1], operands[2])); + else if (CONST_INT_P (operands[2]) + && INTVAL (operands[2]) == 1) + emit_insn (gen_slli_1 (operands[0], operands[1])); else msp430_expand_helper (operands, \"__mspabi_slli\", true); DONE; @@ -825,6 +828,9 @@ && REG_P (operands[1]) && CONST_INT_P (operands[2])) emit_insn (gen_430x_arithmetic_shift_right (operands[0], operands[1], operands[2])); + else if (CONST_INT_P (operands[2]) + && INTVAL (operands[2]) == 1) + emit_insn (gen_srai_1 (operands[0], operands[1])); else msp430_expand_helper (operands, \"__mspabi_srai\", true); DONE; @@ -910,6 +916,9 @@ && REG_P (operands[1]) && CONST_INT_P (operands[2])) emit_insn (gen_430x_logical_shift_right (operands[0], operands[1], operands[2])); + else if (CONST_INT_P (operands[2]) + && INTVAL (operands[2]) == 1) + emit_insn (gen_srli_1 (operands[0], operands[1])); else msp430_expand_helper (operands, \"__mspabi_srli\", true); DONE; |