This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50849] New: long long right shift not vectorized
- From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Oct 2011 10:31:46 +0000
- Subject: [Bug tree-optimization/50849] New: long long right shift not vectorized
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50849
Bug #: 50849
Summary: long long right shift not vectorized
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: vincenzo.innocente@cern.ch
Any reason why left shift is vectorized and right shift not?
long long l1[1024], l2[1024];
void sl() {
for (int i=0;i!=1024;++i)
l1[i] = l2[i]<<52;
}
void rl() {
for (int i=0;i!=1024;++i)
l1[i] = l2[i]>>52;
}
sl():
leaq _l1(%rip),%rcx
xorl %eax,%eax
leaq _l2(%rip),%rdx
movdqa (%rdx,%rax),%xmm0
psllq $0x34,%xmm0
movdqa %xmm0,(%rcx,%rax)
addq $0x10,%rax
cmpq $0x00002000,%eax
jne 0x00000010
repz/ret
nopl (%rax)
rl():
leaq _l1(%rip),%rsi
xorl %eax,%eax
leaq _l2(%rip),%rcx
movq (%rcx,%rax),%rdx
sarq $0x34,%rdx
movq %rdx,(%rsi,%rax)
addq $0x08,%rax
cmpq $0x00002000,%eax
jne 0x00000040
repz/ret