public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/34011] Memory load is not eliminated from tight vectorized loop Date: Tue, 15 Sep 2009 14:07:00 -0000 [thread overview] Message-ID: <20090915140701.16763.qmail@sourceware.org> (raw) In-Reply-To: <bug-34011-1649@http.gcc.gnu.org/bugzilla/> ------- Comment #4 from rguenth at gcc dot gnu dot org 2009-09-15 14:07 ------- With the alias issue fixed I get good: .LFB0: .cfi_startproc movd srcshift(%rip), %xmm1 xorl %eax, %eax .p2align 4,,10 .p2align 3 .L2: movdqu (%rdi,%rax), %xmm0 pslld %xmm1, %xmm0 movdqu %xmm0, (%rsi,%rax) addq $16, %rax cmpq $1024, %rax jne .L2 rep ret bad: .LFB1: .cfi_startproc movd srcshift(%rip), %xmm2 leaq 1024(%rsi), %rax .p2align 4,,10 .p2align 3 .L6: movdqu (%rdi), %xmm0 addq $16, %rdi movdqu (%rsi), %xmm1 pslld %xmm2, %xmm0 por %xmm1, %xmm0 movdqu %xmm0, (%rsi) addq $16, %rsi cmpq %rax, %rsi jne .L6 rep ret which looks good in both cases. For the original testcase which results in a runtime alias check we get bad: .LFB1: .cfi_startproc leaq 16(%rdi), %rax cmpq %rax, %rsi leaq 16(%rsi), %rax seta %dl cmpq %rax, %rdi seta %al orb %al, %dl je .L10 leaq 1024(%rsi), %rax .p2align 4,,10 .p2align 3 .L11: movdqu (%rdi), %xmm0 addq $16, %rdi movd srcshift(%rip), %xmm1 pslld %xmm1, %xmm0 movdqu (%rsi), %xmm1 por %xmm1, %xmm0 movdqu %xmm0, (%rsi) addq $16, %rsi cmpq %rax, %rsi jne .L11 rep ret .L10: movzbl srcshift(%rip), %ecx xorl %eax, %eax .p2align 4,,10 .p2align 3 .L13: movl (%rdi,%rax), %edx sall %cl, %edx orl %edx, (%rsi,%rax) addq $4, %rax cmpq $1024, %rax jne .L13 rep ret thus still bad. It is IRA / reload that moves the srcshift load back into the loop for some reason. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34011
next prev parent reply other threads:[~2009-09-15 14:07 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-11-07 9:05 [Bug rtl-optimization/34011] New: " ubizjak at gmail dot com 2007-11-07 18:06 ` [Bug rtl-optimization/34011] " dorit at gcc dot gnu dot org 2009-09-12 19:25 ` ubizjak at gmail dot com 2009-09-12 20:02 ` [Bug tree-optimization/34011] " rguenth at gcc dot gnu dot org 2009-09-15 14:07 ` rguenth at gcc dot gnu dot org [this message] 2009-09-15 14:40 ` rguenth at gcc dot gnu dot org 2009-09-16 8:51 ` rguenth at gcc dot gnu dot org 2009-09-17 9:08 ` rguenth at gcc dot gnu dot org [not found] <bug-34011-4@http.gcc.gnu.org/bugzilla/> 2012-01-20 10:42 ` ubizjak at gmail dot com 2021-07-26 19:49 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090915140701.16763.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).