public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47580] New: Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7
@ 2011-02-01 20:43 meissner at gcc dot gnu.org
  2011-02-01 20:46 ` [Bug target/47580] " meissner at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-01 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Powerpc GCC fails test gcc.dg/pr41551.c if built with
                    --with-cpu=power7
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: meissner@gcc.gnu.org
        ReportedBy: meissner@gcc.gnu.org
              Host: powerpc64-linux
            Target: powerpc64-linux
             Build: powerpc64-linux


Test gcc.dg/pr41551.c fails for powerpc if the default target is power7.

This is due to the fact that the expander for floatunsdidf (and others) uses
gpc_reg_operand:

(define_expand "floatunsdidf2"
  [(set (match_operand:DF 0 "gpc_reg_operand" "")
    (unsigned_float:DF
     (match_operand:DI 1 "gpc_reg_operand" "")))]
  "TARGET_HARD_FLOAT && (TARGET_FCFIDU || VECTOR_UNIT_VSX_P (DFmode))"
  "")

However, the corresponding VSX matcher uses vsx_register_operand:
(define_insn "vsx_floatuns<VSi><mode>2"
  [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
    (unsigned_float:VSX_B (match_operand:<VSI> 1 "vsx_register_operand"
"<VSr2>,<VSr3>")))]
  "VECTOR_UNIT_VSX_P (<MODE>mode)"
  "x<VSv>cvux<VSc><VSs> %x0,%x1"
  [(set_attr "type" "<VStype_simple>")
   (set_attr "fp_type" "<VSfptype_simple>")])

Gpc_reg_operand allows the virtual stack registers while vsx_register_operand
does not.  Since the test is:

__extension__ typedef __SIZE_TYPE__ size_t;

int main(void)
{
 int var, *p = &var;
 return (double)(size_t)(p);
}

It means the expander creates:

(insn 5 4 6 3 (set (reg:DF 125)
        (unsigned_float:DF (reg/f:DI 115 virtual-stack-vars))) pr41551.c:11 -1
     (nil))

Which then doesn't match when the target is VSX.  There are several different
ways this can be solved:
  1) Allow virtual stack registers to be used in the vsx register operands.
  2) Add a new predicate that doesn't allow virtual stack registers in the
expander;
  3) Add code in the expander to copy the results if it is in a virtual
register.


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

* [Bug target/47580] Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7
  2011-02-01 20:43 [Bug target/47580] New: Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7 meissner at gcc dot gnu.org
@ 2011-02-01 20:46 ` meissner at gcc dot gnu.org
  2011-02-01 20:56 ` meissner at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-01 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Michael Meissner <meissner at gcc dot gnu.org> 2011-02-01 19:02:58 UTC ---
Author: meissner
Date: Tue Feb  1 19:02:55 2011
New Revision: 169499

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169499
Log:
Fix PR 47580

Modified:
    branches/ibm/power7-meissner/gcc/ChangeLog.power7
    branches/ibm/power7-meissner/gcc/config/rs6000/predicates.md


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

* [Bug target/47580] Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7
  2011-02-01 20:43 [Bug target/47580] New: Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7 meissner at gcc dot gnu.org
  2011-02-01 20:46 ` [Bug target/47580] " meissner at gcc dot gnu.org
@ 2011-02-01 20:56 ` meissner at gcc dot gnu.org
  2011-02-01 21:07 ` meissner at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-01 20:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Michael Meissner <meissner at gcc dot gnu.org> 2011-02-01 19:09:53 UTC ---
Created attachment 23203
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23203
Patch that allows virtual registers in vsx register predicates.


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

* [Bug target/47580] Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7
  2011-02-01 20:43 [Bug target/47580] New: Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7 meissner at gcc dot gnu.org
  2011-02-01 20:46 ` [Bug target/47580] " meissner at gcc dot gnu.org
  2011-02-01 20:56 ` meissner at gcc dot gnu.org
@ 2011-02-01 21:07 ` meissner at gcc dot gnu.org
  2011-02-02  1:16 ` meissner at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-01 21:07 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23203|0                           |1
        is obsolete|                            |

--- Comment #3 from Michael Meissner <meissner at gcc dot gnu.org> 2011-02-01 19:17:48 UTC ---
Created attachment 23204
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23204
Replacement patch


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

* [Bug target/47580] Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7
  2011-02-01 20:43 [Bug target/47580] New: Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7 meissner at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-02-01 21:07 ` meissner at gcc dot gnu.org
@ 2011-02-02  1:16 ` meissner at gcc dot gnu.org
  2011-02-03  0:41 ` meissner at gcc dot gnu.org
  2011-02-03  5:51 ` meissner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-02  1:16 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23204|0                           |1
        is obsolete|                            |

--- Comment #4 from Michael Meissner <meissner at gcc dot gnu.org> 2011-02-02 01:16:01 UTC ---
Created attachment 23207
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23207
Replacement patch #2


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

* [Bug target/47580] Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7
  2011-02-01 20:43 [Bug target/47580] New: Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7 meissner at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-02-02  1:16 ` meissner at gcc dot gnu.org
@ 2011-02-03  0:41 ` meissner at gcc dot gnu.org
  2011-02-03  5:51 ` meissner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-03  0:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Michael Meissner <meissner at gcc dot gnu.org> 2011-02-03 00:41:21 UTC ---
Author: meissner
Date: Thu Feb  3 00:41:16 2011
New Revision: 169776

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169776
Log:
Fix PR target/47580

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/vsx.md


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

* [Bug target/47580] Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7
  2011-02-01 20:43 [Bug target/47580] New: Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7 meissner at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-02-03  0:41 ` meissner at gcc dot gnu.org
@ 2011-02-03  5:51 ` meissner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-03  5:51 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

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

--- Comment #6 from Michael Meissner <meissner at gcc dot gnu.org> 2011-02-03 05:51:03 UTC ---
Patch checked in on Feb. 2nd, 2011, subversion id 169776.


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

end of thread, other threads:[~2011-02-03  5:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 20:43 [Bug target/47580] New: Powerpc GCC fails test gcc.dg/pr41551.c if built with --with-cpu=power7 meissner at gcc dot gnu.org
2011-02-01 20:46 ` [Bug target/47580] " meissner at gcc dot gnu.org
2011-02-01 20:56 ` meissner at gcc dot gnu.org
2011-02-01 21:07 ` meissner at gcc dot gnu.org
2011-02-02  1:16 ` meissner at gcc dot gnu.org
2011-02-03  0:41 ` meissner at gcc dot gnu.org
2011-02-03  5:51 ` meissner at gcc dot gnu.org

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