diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-21 17:18:16 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-21 17:18:16 +0000 |
commit | 098e94fb5c1195d82326e394165d8e2a64513eb1 (patch) | |
tree | 2cbb5327c6ed67c66271fe28d2e48f0bbb8e79df /gcc/config/pa | |
parent | 3bdc4a4dad627ab438683aa08e8d4e11542e055a (diff) | |
download | gcc-098e94fb5c1195d82326e394165d8e2a64513eb1.tar.gz |
* config/pa/pa.md (add-with-constant splitter): Use ASHIFT rather
than MULT for shadd sequences.
* gcc.target/hppa/shadd-4.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223495 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa')
-rw-r--r-- | gcc/config/pa/pa.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 73c8f6bce13..aaec27d985e 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -5132,7 +5132,7 @@ (clobber (match_operand:SI 4 "register_operand" ""))] "! pa_cint_ok_for_move (INTVAL (operands[2]))" [(set (match_dup 4) (match_dup 2)) - (set (match_dup 0) (plus:SI (mult:SI (match_dup 4) (match_dup 3)) + (set (match_dup 0) (plus:SI (ashift:SI (match_dup 4) (match_dup 3)) (match_dup 1)))] " { @@ -5147,17 +5147,17 @@ if (intval % 2 == 0 && pa_cint_ok_for_move (intval / 2)) { operands[2] = GEN_INT (intval / 2); - operands[3] = const2_rtx; + operands[3] = const1_rtx; } else if (intval % 4 == 0 && pa_cint_ok_for_move (intval / 4)) { operands[2] = GEN_INT (intval / 4); - operands[3] = GEN_INT (4); + operands[3] = const2_rtx; } else if (intval % 8 == 0 && pa_cint_ok_for_move (intval / 8)) { operands[2] = GEN_INT (intval / 8); - operands[3] = GEN_INT (8); + operands[3] = GEN_INT (3); } else if (pa_cint_ok_for_move (-intval)) { |