aboutsummaryrefslogtreecommitdiff
path: root/gcc/stack-ptr-mod.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@nextmovesoftware.com>2020-08-25 18:57:55 +0100
committerRoger Sayle <roger@nextmovesoftware.com>2020-08-25 18:57:55 +0100
commitf410cd248566febad02edacee3ec5f13ae3fc990 (patch)
treeae6c1dd6d21651d41528c6a8f6ff91f391162319 /gcc/stack-ptr-mod.c
parent3d5ed337cb354c2f85a9caf60377bad887b18d53 (diff)
downloadgcc-f410cd248566febad02edacee3ec5f13ae3fc990.zip
gcc-f410cd248566febad02edacee3ec5f13ae3fc990.tar.gz
gcc-f410cd248566febad02edacee3ec5f13ae3fc990.tar.bz2
hppa: Improve expansion of ashldi3 when !TARGET_64BIT
This patch improves the code generated on PA-RISC for DImode (double word) left shifts by small constants (1-31). This target has a very cool shd instruction that can be recognized by combine for simple shifts, but relying on combine is fragile for more complicated functions. This patch tweaks pa.md's ashldi3 expander, to form the optimal two instruction shd/zdep sequence at RTL expansion time. As an example of the benefits of this approach, the simple function unsigned long long u9(unsigned long long x) { return x*9; } currently generates 9 instructions and with this patch now requires only 7. 2020-08-25 Roger Sayle <roger@nextmovesoftware.com> * config/pa/pa.md (ashldi3): Additionally, on !TARGET_64BIT generate a two instruction shd/zdep sequence when shifting registers by suitable constants. (shd_internal): New define_expand to provide gen_shd_internal.
Diffstat (limited to 'gcc/stack-ptr-mod.c')
0 files changed, 0 insertions, 0 deletions