--- Comment #4 from svfuerst at gmail dot com 2010-04-30 16:33 ---
Argh, the sar trick doesn't work when the number is negative and even. Sorry
about the extra noise.
This leaves as the best code:
mov%rsi,%rdx
shr$0x3f,%rdx
lea(%rdi,%rdx,1),%rax
and$0x1,%eax
sub%rdx
--- Comment #3 from svfuerst at gmail dot com 2010-04-30 16:12 ---
Oops, you are right. The 128 bit version needs an extra sbb on the end with
that code. (For some reason I was missreading the shr as a sar.):
mov%rsi,%rdx
shr$0x3f,%rdx
lea(%rdi,%rdx,1),%rax
and$0x1,%ea
--- Comment #2 from ubizjak at gmail dot com 2010-04-30 09:12 ---
(In reply to comment #1)
> There isn't any pattern for the TImode variant.
Huh? Expansion uses TImode where appropriate:
(insn 10 9 11 ttt.c:3 (parallel [
(set (reg:DI 66)
(ashiftrt:DI (subreg
--- Comment #1 from rguenth at gcc dot gnu dot org 2010-04-25 20:09 ---
There isn't any pattern for the TImode variant.
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
-