On Fri, 2020-08-21 at 13:53 +0100, Roger Sayle wrote:
> 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
> 
> u9:     copy %r25,%r28
>         copy %r26,%r29
>         extru %r26,2,3,%r21
>         zdep %r25,28,29,%r19
>         zdep %r26,28,29,%r20
>         or %r21,%r19,%r19
>         add %r29,%r20,%r29
>         addc %r28,%r19,%r28
>         bv,n %r0(%r2)
> 
> and with this patch now requires only 7:
> 
> u9:     copy %r25,%r28
>         copy %r26,%r29
>         shd %r26,%r25,29,%r19
>         zdep %r26,28,29,%r20
>         add %r29,%r20,%r29
>         addc %r28,%r19,%r28
>         bv,n %r0(%r2)
> 
> 
> This improvement is a first step towards getting synth_mult to
> behave sanely on hppa (PR middle-end/87256).
> 
> Unfortunately, it's been a long while since I've had access to a
> hppa system, so apart from building a cross-compiler and looking at
> the assembler it generates, this patch is completely untested.
> I was wondering whether Dave or Jeff (or someone else with access
> to real hardware) might "spin" this patch for me?
So while I have an R390 down in the basement, it overheats and I don't think 
I've
turned it on in a few years.

What I do for testing is exploit QEMU user mode emulation.  I have a little root
filesystem with HPPA binaries -- there's enough bits in that filesystem to build
binutils, gcc, glibc & the linux kernel as well as run the testsuite.

The root filesystems are here:

https://github.com/JeffreyALaw/chroots

The Jenkins tester spins the PA once week.  It failed its last run due to
regressions in the analyzer.  I didn't realize it was running the static 
analyzer
for the qemu emulated targets, which I turned off yesterday and re-started the 
PA
build.

http://3.14.90.209:8080/job/hppa-linux-gnu/



Jeff
> 

Reply via email to