[Bug target/95704] PPC: int128 shifts should be implemented branchless

2021-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95704 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug target/95704] PPC: int128 shifts should be implemented branchless

2020-06-17 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95704 --- Comment #6 from Segher Boessenkool --- 13 insns, but the longest chain is 4. As I said, not totally awful, and much better than the branchy code (which does not predict well, for more general inputs anyway).

[Bug target/95704] PPC: int128 shifts should be implemented branchless

2020-06-17 Thread jens.seifert at de dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95704 --- Comment #5 from Jens Seifert --- Power9 code is branchfree but not good at all. _Z3shloy: .LFB0: .cfi_startproc addi 8,5,-64 subfic 6,5,63 srdi 10,3,1 li 7,0 sld 4,4,5 sld 5,3,5

[Bug target/95704] PPC: int128 shifts should be implemented branchless

2020-06-17 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95704 --- Comment #4 from Segher Boessenkool --- It no longer generates that rldicl in GCC 9 (or GCC 10). You do get straight-line code already if you use -mcpu=power9, btw (isel; and not totally awful code, but it isn't super of course).

[Bug target/95704] PPC: int128 shifts should be implemented branchless

2020-06-17 Thread jens.seifert at de dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95704 --- Comment #3 from Jens Seifert --- GCC 8.3 generates: _Z3shloy: .LFB0: .cfi_startproc addi 9,5,-64 cmpwi 7,9,0 blt 7,.L2 sld 4,3,9 li 3,0 blr .p2align 4,,15 .L2: srdi

[Bug target/95704] PPC: int128 shifts should be implemented branchless

2020-06-17 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95704 Segher Boessenkool changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug target/95704] PPC: int128 shifts should be implemented branchless

2020-06-16 Thread jens.seifert at de dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95704 --- Comment #1 from Jens Seifert --- Created attachment 48742 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48742=edit assembly