public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "evstupac at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65710] [4.9/5 Regression] Thumb1 ICE caused by no register to spill
Date: Fri, 10 Apr 2015 15:25:00 -0000	[thread overview]
Message-ID: <bug-65710-4-paLgv83a6O@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65710-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65710

--- Comment #13 from Stupachenko Evgeny <evstupac at gmail dot com> ---
The issue reproduced with -march=corei7 as well.

Currently the hottest loop looks as following:
L1.
mov    (%esp),%ebp /* potentially redundant.  */
and    $0x7fff,%ebp                                          
movzwl 0x400(%esi,%ebp,2),%ecx                               
mov    %ecx,(%esp) 
cmp    %ecx,0x4(%esp) /*  Why not reuse ebp?  */        
jae    380                                                   
subl   $0x1,0x8(%esp)                                        
je     380                                                   
mov    (%esp),%ebp /* ebp could contain correct value (if reused above).  */
add    %edi,%ebp                                             
cmp    0x0(%ebp,%ebx,1),%al                                  
jne    L1
movzbl 0xf(%esp),%edx                                       
cmp    -0x1(%ebp,%ebx,1),%dl                               
jne    L1

Unnecessary fills and spills of ebp added.
Before the patch the loop was 2 instruction shorter.

L1.
and    $0x7fff,%edx                                             
movzwl 0x400(%esi,%edx,2),%edx                                  
cmp    %edx,0x4(%esp)                                           
jae    3c0                                                      
sub    $0x1,%ebp                                                
je     3c0                                                      
lea    (%edi,%edx,1),%ecx                                       
movzbl (%esp),%eax                                              
cmp    (%ecx,%ebx,1),%al                                        
jne    L1
movzbl 0xb(%esp),%eax                                           
cmp    -0x1(%ecx,%ebx,1),%al                                    
jne    L1.

Please let me know if you need dumps.


  parent reply	other threads:[~2015-04-10 15:25 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09  7:03 [Bug target/65710] New: [5 " terry.guo at arm dot com
2015-04-09  7:59 ` [Bug target/65710] " rguenth at gcc dot gnu.org
2015-04-09  9:18 ` rguenth at gcc dot gnu.org
2015-04-09  9:30 ` terry.guo at arm dot com
2015-04-09 19:40 ` vmakarov at gcc dot gnu.org
2015-04-09 19:42 ` vmakarov at gcc dot gnu.org
2015-04-10  5:59 ` terry.guo at arm dot com
2015-04-10  6:29 ` jakub at gcc dot gnu.org
2015-04-10 11:30 ` evstupac at gmail dot com
2015-04-10 11:48 ` [Bug target/65710] [4.9 " jakub at gcc dot gnu.org
2015-04-10 13:05 ` yroux at gcc dot gnu.org
2015-04-10 13:06 ` [Bug target/65710] [4.9/5 " jakub at gcc dot gnu.org
2015-04-10 15:25 ` evstupac at gmail dot com [this message]
2015-04-10 16:10 ` jakub at gcc dot gnu.org
2015-04-10 16:19 ` vmakarov at gcc dot gnu.org
2015-04-10 16:35 ` jakub at gcc dot gnu.org
2015-04-10 16:38 ` evstupac at gmail dot com
2015-04-10 16:41 ` jakub at gcc dot gnu.org
2015-04-10 16:42 ` vmakarov at gcc dot gnu.org
2015-04-10 16:45 ` jakub at gcc dot gnu.org
2015-04-10 16:47 ` evstupac at gmail dot com
2015-04-10 17:08 ` jakub at gcc dot gnu.org
2015-04-10 18:23 ` yroux at gcc dot gnu.org
2015-04-10 18:53 ` jakub at gcc dot gnu.org
2015-04-10 19:39 ` vmakarov at gcc dot gnu.org
2015-04-10 19:44 ` vmakarov at gcc dot gnu.org
2015-04-10 19:46 ` vmakarov at gcc dot gnu.org
2015-04-10 20:44 ` yroux at gcc dot gnu.org
2015-04-11  7:32 ` jakub at gcc dot gnu.org
2015-04-13  5:22 ` xguo at gcc dot gnu.org
2015-04-13 12:15 ` clyon at gcc dot gnu.org
2015-04-14  3:15 ` terry.guo at arm dot com

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=bug-65710-4-paLgv83a6O@http.gcc.gnu.org/bugzilla/ \
    --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: link
Be 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).