public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/26235]  New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
@ 2006-02-12 18:47 danglin at gcc dot gnu dot org
  2006-02-12 19:17 ` [Bug tree-optimization/26235] " rakdver at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: danglin at gcc dot gnu dot org @ 2006-02-12 18:47 UTC (permalink / raw)
  To: gcc-bugs

Executing on host: /mnt/gnu/gcc-3.3/objdir/gcc/xgcc
-B/mnt/gnu/gcc-3.3/objdir/gc
c/ /mnt/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8l.c 
-w
  -O1  -fno-show-column  -lm   -o
/mnt/gnu/gcc-3.3/objdir/gcc/testsuite/gcc/fp-c
mp-8l.x1    (timeout = 300)
PASS: gcc.c-torture/execute/ieee/fp-cmp-8l.c compilation,  -O1
Setting LD_LIBRARY_PATH to
:/mnt/gnu/gcc-3.3/objdir/gcc::/mnt/gnu/gcc-3.3/objdir
/gcc
FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution,  -O1

This appears to be another loop optimization issue:

main
        .PROC
        .CALLINFO FRAME=320,CALLS,SAVE_RP,ENTRY_GR=18,ENTRY_FR=12
        .ENTRY
        stw %r2,-20(%r30)
        ldo 320(%r30),%r30
        stw %r18,-216(%r30)
        stw %r17,-212(%r30)
        stw %r16,-208(%r30)
        stw %r15,-204(%r30)
        stw %r14,-200(%r30)
        stw %r13,-196(%r30)
        stw %r12,-192(%r30)
        stw %r11,-188(%r30)
        stw %r10,-184(%r30)
        stw %r9,-180(%r30)
        stw %r8,-176(%r30)
        stw %r7,-172(%r30)
        stw %r6,-168(%r30)
        stw %r5,-164(%r30)
        stw %r4,-160(%r30)
        stw %r3,-156(%r30)
        ldo -152(%r30),%r1
        fstds,ma %fr12,8(%r1)
        .stabn  68,0,95,L$M0037-main
L$M0037:
        ldi 0,%r11
        ldil LR'data___1657,%r28
        ldo RR'data___1657(%r28),%r5
        .stabn  68,0,141,L$M0038-main
L$M0038:
        addil LR'tests___1669-$global$,%r27
        ldo RR'tests___1669-$global$(%r1),%r18
L$BB0004:
        .stabn  68,0,84,L$M0039-main
L$M0039:
        ldil L'1073676288,%r14
        ldil L'1073741824,%r17
        ldo -296(%r30),%r9
        ldo -280(%r30),%r8
        ldo -264(%r30),%r12
        ldo -248(%r30),%r15
        .stabn  68,0,86,L$M0040-main
L$M0040:
        ldil L'1073807360,%r1
        stws %r1,-16(%sp)
        fldws -16(%sp),%fr12L
        .stabn  68,0,84,L$M0041-main
L$M0041:
        b L$0078
        ldo -312(%r30),%r16
L$0079:
L$BE0004:
        .stabn  68,0,141,L$M0042-main
L$M0042:
        ldw 0(%r7),%r10
        ldw 4(%r6),%r13
L$BB0005:
        .stabn  68,0,84,L$M0043-main
L$M0043:
        stw %r4,-296(%r30)
        stw %r4,-292(%r30)
        stw %r4,-288(%r30)
        stw %r4,-284(%r30)
        stw %r3,-280(%r30)
        stw %r3,-276(%r30)
        stw %r3,-272(%r30)
        stw %r3,-268(%r30)
        stw %r14,-264(%r30)
        stw %r0,-260(%r30)
        stw %r0,-256(%r30)
        stw %r0,-252(%r30)
        stw %r17,-248(%r30)
        stw %r0,-244(%r30)
        stw %r0,-240(%r30)
        stw %r0,-236(%r30)
        copy %r16,%r28
        copy %r9,%r26
        copy %r8,%r25
        copy %r12,%r24
        copy %r15,%r23
        ldw 0(%r6),%r22
        .CALL   ARGW0=GR
        bl $$dyncall,%r31
        copy %r31,%r2

The stack setup for the indirect calls to test_isunordered, etc, via
$$dyncall is bogus:

        stw %r4,-296(%r30)
        stw %r4,-292(%r30)
        stw %r4,-288(%r30)
        stw %r4,-284(%r30)
        stw %r3,-280(%r30)
        stw %r3,-276(%r30)
        stw %r3,-272(%r30)
        stw %r3,-268(%r30)

The same 32-bit value is being put into each quarter of the long double.

I would guess this PR is related to PR rtl-optimization/26225.


-- 
           Summary: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution
                    at -O1, -O2 and -Os
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa2.0w-hp-hpux11.11
  GCC host triplet: hppa2.0w-hp-hpux11.11
GCC target triplet: hppa2.0w-hp-hpux11.11


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


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

* [Bug tree-optimization/26235] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
@ 2006-02-12 19:17 ` rakdver at gcc dot gnu dot org
  2006-02-12 19:32 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-12 19:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rakdver at gcc dot gnu dot org  2006-02-12 19:17 -------
Can you please add preprocessed source for the testcase (minimized,
preferably)?


-- 


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


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

* [Bug tree-optimization/26235] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
  2006-02-12 19:17 ` [Bug tree-optimization/26235] " rakdver at gcc dot gnu dot org
@ 2006-02-12 19:32 ` dave at hiauly1 dot hia dot nrc dot ca
  2006-02-12 20:03 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2006-02-12 19:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dave at hiauly1 dot hia dot nrc dot ca  2006-02-12 19:32 -------
Subject: Re:  FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1,
-O2 and -Os

> Can you please add preprocessed source for the testcase (minimized,
> preferably)?

Here's the unminimized source.  I'll see if I can reduce it.

Dave


------- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2006-02-12 19:32 -------
Created an attachment (id=10828)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10828&action=view)


-- 


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


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

* [Bug tree-optimization/26235] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
  2006-02-12 19:17 ` [Bug tree-optimization/26235] " rakdver at gcc dot gnu dot org
  2006-02-12 19:32 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2006-02-12 20:03 ` dave at hiauly1 dot hia dot nrc dot ca
  2006-02-12 20:04 ` [Bug rtl-optimization/26235] [4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2006-02-12 20:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca  2006-02-12 20:02 -------
Subject: Re:  FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1,
-O2 and -Os

> Can you please add preprocessed source for the testcase (minimized,
> preferably)?

Here's a smaller version that still fails.

Dave


------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2006-02-12 20:02 -------
Created an attachment (id=10829)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10829&action=view)


-- 


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


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

* [Bug rtl-optimization/26235] [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-02-12 20:03 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2006-02-12 20:04 ` pinskia at gcc dot gnu dot org
  2006-02-12 20:26 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-12 20:04 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |rtl-optimization
           Keywords|                            |wrong-code
            Summary|FAIL: gcc.c-                |[4.2 Regression] FAIL:
                   |torture/execute/ieee/fp-cmp-|gcc.c-
                   |8l.c execution at -O1, -O2  |torture/execute/ieee/fp-cmp-
                   |and -Os                     |8l.c execution at -O1, -O2
                   |                            |and -Os
   Target Milestone|---                         |4.2.0


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


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

* [Bug rtl-optimization/26235] [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-02-12 20:04 ` [Bug rtl-optimization/26235] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-02-12 20:26 ` dave at hiauly1 dot hia dot nrc dot ca
  2006-02-12 20:45 ` rakdver at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2006-02-12 20:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca  2006-02-12 20:26 -------
Subject: Re:  [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c
execution at -O1, -O2 and -Os

This is with the second testcase except that I made the test functions
extern.  It looks to me like things go wrong in the loop2_invariant pass.

Dave


------- Comment #7 from dave at hiauly1 dot hia dot nrc dot ca  2006-02-12 20:26 -------
Created an attachment (id=10830)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10830&action=view)


------- Comment #8 from dave at hiauly1 dot hia dot nrc dot ca  2006-02-12 20:26 -------
Created an attachment (id=10831)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10831&action=view)


-- 


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


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

* [Bug rtl-optimization/26235] [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-02-12 20:26 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2006-02-12 20:45 ` rakdver at gcc dot gnu dot org
  2006-02-12 21:12 ` rakdver at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-12 20:45 UTC (permalink / raw)
  To: gcc-bugs



-- 

rakdver at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rakdver at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-12 20:45:41
               date|                            |


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


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

* [Bug rtl-optimization/26235] [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-02-12 20:45 ` rakdver at gcc dot gnu dot org
@ 2006-02-12 21:12 ` rakdver at gcc dot gnu dot org
  2006-02-13 23:19 ` rakdver at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-12 21:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rakdver at gcc dot gnu dot org  2006-02-12 21:12 -------
This should fix the problem (could you please verify it?).  I am really
surprised this problem did not show on other architectures.

Index: loop-invariant.c
===================================================================
*** loop-invariant.c    (revision 110850)
--- loop-invariant.c    (working copy)
*************** hash_invariant_expr_1 (rtx insn, rtx x)
*** 292,297 ****
--- 292,299 ----
          for (j = 0; j < XVECLEN (x, i); j++)
            val ^= hash_invariant_expr_1 (insn, XVECEXP (x, i, j));
        }
+       else if (fmt[i] == 'i' || fmt[i] == 'n')
+       val ^= XINT (x, i);
      }

    return val;
*************** invariant_expr_equal_p (rtx insn1, rtx e
*** 373,378 ****
--- 375,388 ----
                return false;
            }
        }
+       else if (fmt[i] == 'i' || fmt[i] == 'n')
+       {
+         if (XINT (e1, i) != XINT (e2, i))
+           return false;
+       }
+       /* Unhandled type of subexpression, we fail conservatively.  */
+       else
+       return false;
      }

    return true;


-- 


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


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

* [Bug rtl-optimization/26235] [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-02-12 21:12 ` rakdver at gcc dot gnu dot org
@ 2006-02-13 23:19 ` rakdver at gcc dot gnu dot org
  2006-02-14 14:23 ` pinskia at gcc dot gnu dot org
  2006-02-14 14:28 ` dave at hiauly1 dot hia dot nrc dot ca
  9 siblings, 0 replies; 11+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-13 23:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rakdver at gcc dot gnu dot org  2006-02-13 23:19 -------
Subject: Bug 26235

Author: rakdver
Date: Mon Feb 13 23:19:49 2006
New Revision: 110939

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110939
Log:
        PR rtl-optimization/26235
        * loop-invariant.c (hash_invariant_expr_1): Handle 'i' and 'n' formats.
        (invariant_expr_equal_p): Handle 'i' and 'n' formats.  Fail on unknown
        format.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/loop-invariant.c


-- 


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


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

* [Bug rtl-optimization/26235] [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-02-13 23:19 ` rakdver at gcc dot gnu dot org
@ 2006-02-14 14:23 ` pinskia at gcc dot gnu dot org
  2006-02-14 14:28 ` dave at hiauly1 dot hia dot nrc dot ca
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-14 14:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2006-02-14 14:23 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug rtl-optimization/26235] [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os
  2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-02-14 14:23 ` pinskia at gcc dot gnu dot org
@ 2006-02-14 14:28 ` dave at hiauly1 dot hia dot nrc dot ca
  9 siblings, 0 replies; 11+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2006-02-14 14:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from dave at hiauly1 dot hia dot nrc dot ca  2006-02-14 14:28 -------
Subject: Re:  [4.2 Regression] FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c
execution at -O1, -O2 and -Os

> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110939
> Log:
>         PR rtl-optimization/26235
>         * loop-invariant.c (hash_invariant_expr_1): Handle 'i' and 'n' formats.
>         (invariant_expr_equal_p): Handle 'i' and 'n' formats.  Fail on unknown
>         format.

This fixes the PR bug.  See
http://gcc.gnu.org/ml/gcc-testresults/2006-02/msg00710.html
Sorry, this took so long to confirm.

We are still left with these new fails:

FAIL: gcc.c-torture/execute/builtin-bitops-1.c execution,  -O3
-fomit-frame-pointer -funroll-loops 
FAIL: gcc.c-torture/execute/builtin-bitops-1.c execution,  -O3
-fomit-frame-pointer -funroll-all-loops -finline-functions 
FAIL: gcc.dg/tree-ssa/gen-vect-26.c execution test
FAIL: gcc.dg/tree-ssa/gen-vect-28.c execution test

I haven't looked at the gen-vect fails.

Dave


-- 


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


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

end of thread, other threads:[~2006-02-14 14:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-12 18:47 [Bug tree-optimization/26235] New: FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os danglin at gcc dot gnu dot org
2006-02-12 19:17 ` [Bug tree-optimization/26235] " rakdver at gcc dot gnu dot org
2006-02-12 19:32 ` dave at hiauly1 dot hia dot nrc dot ca
2006-02-12 20:03 ` dave at hiauly1 dot hia dot nrc dot ca
2006-02-12 20:04 ` [Bug rtl-optimization/26235] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-02-12 20:26 ` dave at hiauly1 dot hia dot nrc dot ca
2006-02-12 20:45 ` rakdver at gcc dot gnu dot org
2006-02-12 21:12 ` rakdver at gcc dot gnu dot org
2006-02-13 23:19 ` rakdver at gcc dot gnu dot org
2006-02-14 14:23 ` pinskia at gcc dot gnu dot org
2006-02-14 14:28 ` dave at hiauly1 dot hia dot nrc dot ca

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