public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36936]  New: [4.4 Regression]: Revision 138075 breaks cmove
@ 2008-07-25 15:36 hjl dot tools at gmail dot com
  2008-07-25 15:37 ` [Bug target/36936] " hjl dot tools at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-25 15:36 UTC (permalink / raw)
  To: gcc-bugs

[hjl@gnu-6 gcc]$ cat /tmp/c.c
int
foo (int x)
{
if (x < 0)
 x = 1;
return x;
}
[hjl@gnu-6 gcc]$ ./xgcc -B./ -m32 -S -O2 /tmp/c.c -march=i686
[hjl@gnu-6 gcc]$ cat c.s
        .file   "c.c"
        .text
        .p2align 4,,15
.globl foo
        .type   foo, @function
foo:
        pushl   %ebp
        movl    %esp, %ebp
        movl    8(%ebp), %eax
        testl   %eax, %eax
        js      .L5
        popl    %ebp
        ret
        .p2align 4,,7
        .p2align 3
.L5:
        movl    $1, %eax
        popl    %ebp
        ret
        .size   foo, .-foo


-- 
           Summary: [4.4 Regression]: Revision 138075 breaks cmove
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/36936] [4.4 Regression]: Revision 138075 breaks cmove
  2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
@ 2008-07-25 15:37 ` hjl dot tools at gmail dot com
  2008-07-25 15:41 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-25 15:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2008-07-25 15:36 -------
I believe this bug was introduced by

@@ -2743,11 +3118,13 @@ override_options (void)
       && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
     {
       if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
-       warning (0, "stack probing requires -maccumulate-outgoing-args "
-                "for correctness");
+       warning (0, "stack probing requires %saccumulate-outgoing-args%s "
+                "for correctness", prefix, suffix);
       target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
     }    

+  TARGET_CMOVE = 0;
+
   /* For sane SSE instruction set generation we need fcomi instruction.
      It is safe to enable all CMOVE instructions.  */
   if (TARGET_SSE)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/36936] [4.4 Regression]: Revision 138075 breaks cmove
  2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
  2008-07-25 15:37 ` [Bug target/36936] " hjl dot tools at gmail dot com
@ 2008-07-25 15:41 ` rguenth at gcc dot gnu dot org
  2008-07-25 16:46 ` gnu at the-meissners dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-07-25 15:41 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
   Target Milestone|---                         |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/36936] [4.4 Regression]: Revision 138075 breaks cmove
  2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
  2008-07-25 15:37 ` [Bug target/36936] " hjl dot tools at gmail dot com
  2008-07-25 15:41 ` rguenth at gcc dot gnu dot org
@ 2008-07-25 16:46 ` gnu at the-meissners dot org
  2008-07-25 17:16 ` hjl dot tools at gmail dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: gnu at the-meissners dot org @ 2008-07-25 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from gnu at the-meissners dot org  2008-07-25 16:45 -------
Subject: Re:  [4.4 Regression]: Revision 138075 breaks
        cmove

On Fri, Jul 25, 2008 at 03:36:51PM -0000, hjl dot tools at gmail dot com wrote:
> 
> 
> ------- Comment #1 from hjl dot tools at gmail dot com  2008-07-25 15:36 -------
> I believe this bug was introduced by
> 
> @@ -2743,11 +3118,13 @@ override_options (void)
>        && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
>      {
>        if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
> -       warning (0, "stack probing requires -maccumulate-outgoing-args "
> -                "for correctness");
> +       warning (0, "stack probing requires %saccumulate-outgoing-args%s "
> +                "for correctness", prefix, suffix);
>        target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
>      }    
> 
> +  TARGET_CMOVE = 0;
> +
>    /* For sane SSE instruction set generation we need fcomi instruction.
>       It is safe to enable all CMOVE instructions.  */
>    if (TARGET_SSE)

However, that would break using attribute((option("arch=i386"))) to turn off
cmoves.  I suspect the patch needs to be reworked.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/36936] [4.4 Regression]: Revision 138075 breaks cmove
  2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
                   ` (2 preceding siblings ...)
  2008-07-25 16:46 ` gnu at the-meissners dot org
@ 2008-07-25 17:16 ` hjl dot tools at gmail dot com
  2008-07-25 17:45 ` hjl dot tools at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-25 17:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2008-07-25 17:15 -------
(In reply to comment #2)
>
> However, that would break using attribute((option("arch=i386"))) to turn off
> cmoves.  I suspect the patch needs to be reworked.
> 

Does revision 138075 include a testcase for this?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/36936] [4.4 Regression]: Revision 138075 breaks cmove
  2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
                   ` (3 preceding siblings ...)
  2008-07-25 17:16 ` hjl dot tools at gmail dot com
@ 2008-07-25 17:45 ` hjl dot tools at gmail dot com
  2008-07-25 18:09 ` gnu at the-meissners dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-25 17:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2008-07-25 17:45 -------
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02031.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |07/msg02031.html


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/36936] [4.4 Regression]: Revision 138075 breaks cmove
  2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
                   ` (4 preceding siblings ...)
  2008-07-25 17:45 ` hjl dot tools at gmail dot com
@ 2008-07-25 18:09 ` gnu at the-meissners dot org
  2008-07-25 18:14 ` hjl dot tools at gmail dot com
  2008-07-27 18:59 ` hjl dot tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: gnu at the-meissners dot org @ 2008-07-25 18:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from gnu at the-meissners dot org  2008-07-25 18:08 -------
Subject: Re:  [4.4 Regression]: Revision 138075 breaks
        cmove

On Fri, Jul 25, 2008 at 05:15:17PM -0000, hjl dot tools at gmail dot com wrote:
> 
> 
> ------- Comment #3 from hjl dot tools at gmail dot com  2008-07-25 17:15 -------
> (In reply to comment #2)
> >
> > However, that would break using attribute((option("arch=i386"))) to turn off
> > cmoves.  I suspect the patch needs to be reworked.
> > 
> 
> Does revision 138075 include a testcase for this?

No, but I was trying to explain what the motativation for the line was.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/36936] [4.4 Regression]: Revision 138075 breaks cmove
  2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
                   ` (5 preceding siblings ...)
  2008-07-25 18:09 ` gnu at the-meissners dot org
@ 2008-07-25 18:14 ` hjl dot tools at gmail dot com
  2008-07-27 18:59 ` hjl dot tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-25 18:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hjl dot tools at gmail dot com  2008-07-25 18:13 -------
(In reply to comment #5)
> > Does revision 138075 include a testcase for this?
> 
> No, but I was trying to explain what the motativation for the line was.
> 

I added 2 tesstcases in my patch:

http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02031.html

They seem to work fine. Did I miss something?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/36936] [4.4 Regression]: Revision 138075 breaks cmove
  2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
                   ` (6 preceding siblings ...)
  2008-07-25 18:14 ` hjl dot tools at gmail dot com
@ 2008-07-27 18:59 ` hjl dot tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-27 18:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2008-07-27 18:58 -------
Fixed by revision 138154.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36936


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-07-27 18:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-25 15:36 [Bug target/36936] New: [4.4 Regression]: Revision 138075 breaks cmove hjl dot tools at gmail dot com
2008-07-25 15:37 ` [Bug target/36936] " hjl dot tools at gmail dot com
2008-07-25 15:41 ` rguenth at gcc dot gnu dot org
2008-07-25 16:46 ` gnu at the-meissners dot org
2008-07-25 17:16 ` hjl dot tools at gmail dot com
2008-07-25 17:45 ` hjl dot tools at gmail dot com
2008-07-25 18:09 ` gnu at the-meissners dot org
2008-07-25 18:14 ` hjl dot tools at gmail dot com
2008-07-27 18:59 ` hjl dot tools at gmail dot com

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).