public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/53141] New: [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c
@ 2012-04-27 13:56 hjl.tools at gmail dot com
  2012-04-27 14:33 ` [Bug rtl-optimization/53141] " krebbel at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2012-04-27 13:56 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53141
           Summary: [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: areg.melikadamyan@gmail.com, krebbel@gcc.gnu.org,
                    ubizjak@gmail.com


On Linux/ia32, revision 186861

http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00814.html

caused:

FAIL: gcc.target/i386/bmi2-mulx32-1a.c scan-assembler-times bmi2_umulsidi3_1 1
FAIL: gcc.target/i386/bmi2-mulx32-2a.c scan-assembler-times mulx[ \\t]+[^\n]* 1


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

* [Bug rtl-optimization/53141] [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c
  2012-04-27 13:56 [Bug rtl-optimization/53141] New: [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c hjl.tools at gmail dot com
@ 2012-04-27 14:33 ` krebbel at gcc dot gnu.org
  2012-04-27 14:48 ` krebbel at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-04-27 14:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-04-27 14:32:23 UTC ---
That's because reload now will try with swapped operands before going to the
next alternative. So now the first alternative will be used instead of the
second.

This matches the behavior documented in the GCC internal manual:

http://gcc.gnu.org/onlinedocs/gccint/Multi_002dAlternative.html
"If two alternatives need the same amount of copying, the one that
comes first is chosen."

So if the second alternative is preferable then the back-end pattern needs to
be adjusted.

ira:
(insn 9 4 14 2 (parallel [
            (set (reg:DI 65 [ res ])
                (mult:DI (zero_extend:DI (reg/v:SI 64 [ b ]))
                    (zero_extend:DI (reg/v:SI 63 [ a ]))))
            (clobber (reg:CC 17 flags))
        ]) bmi2-mulx32-1.c:24 336 {*umulsidi3_1}
     (expr_list:REG_DEAD (reg/v:SI 64 [ b ])
        (expr_list:REG_DEAD (reg/v:SI 63 [ a ])
            (expr_list:REG_UNUSED (reg:CC 17 flags)
                (nil)))))

reload:
(insn 9 4 17 2 (parallel [
            (set (reg:DI 0 ax [orig:65 res ] [65])
                (mult:DI (zero_extend:DI (reg/v:SI 0 ax [orig:63 a ] [63]))
                    (zero_extend:DI (reg/v:SI 1 dx [orig:64 b ] [64]))))
            (clobber (reg:CC 17 flags))
        ]) bmi2-mulx32-1.c:24 336 {*umulsidi3_1}
     (nil))

back-end pattern:

(define_insn "*umul<mode><dwi>3_1"
  [(set (match_operand:<DWI> 0 "register_operand" "=A,r")
    (mult:<DWI>
      (zero_extend:<DWI>
        (match_operand:DWIH 1 "nonimmediate_operand" "%0,d"))
      (zero_extend:<DWI>
        (match_operand:DWIH 2 "nonimmediate_operand" "rm,rm"))))
   (clobber (reg:CC FLAGS_REG))]


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

* [Bug rtl-optimization/53141] [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c
  2012-04-27 13:56 [Bug rtl-optimization/53141] New: [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c hjl.tools at gmail dot com
  2012-04-27 14:33 ` [Bug rtl-optimization/53141] " krebbel at gcc dot gnu.org
@ 2012-04-27 14:48 ` krebbel at gcc dot gnu.org
  2012-04-30  8:19 ` [Bug target/53141] " ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-04-27 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-04-27 14:47:15 UTC ---
Created attachment 27252
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27252
Patch proposal

This patch should bring back the old behavior.


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

* [Bug target/53141] [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c
  2012-04-27 13:56 [Bug rtl-optimization/53141] New: [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c hjl.tools at gmail dot com
  2012-04-27 14:33 ` [Bug rtl-optimization/53141] " krebbel at gcc dot gnu.org
  2012-04-27 14:48 ` krebbel at gcc dot gnu.org
@ 2012-04-30  8:19 ` ubizjak at gmail dot com
  2012-04-30 21:30 ` uros at gcc dot gnu.org
  2012-04-30 21:33 ` ubizjak at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-30  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-04-30
          Component|rtl-optimization            |target
   Target Milestone|---                         |4.8.0
     Ever Confirmed|0                           |1

--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-30 08:18:41 UTC ---
(In reply to comment #2)
> Created attachment 27252 [details]
> Patch proposal
> 
> This patch should bring back the old behavior.

The patch is OK, please submit it to gcc-patches@ mailing list.


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

* [Bug target/53141] [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c
  2012-04-27 13:56 [Bug rtl-optimization/53141] New: [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2012-04-30  8:19 ` [Bug target/53141] " ubizjak at gmail dot com
@ 2012-04-30 21:30 ` uros at gcc dot gnu.org
  2012-04-30 21:33 ` ubizjak at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: uros at gcc dot gnu.org @ 2012-04-30 21:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from uros at gcc dot gnu.org 2012-04-30 21:30:13 UTC ---
Author: uros
Date: Mon Apr 30 21:30:06 2012
New Revision: 187000

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187000
Log:
    PR target/53141
    * config/i386/i386.md (*umul<mode><dwi>3_1): Switch places of
    constraints 0 and 1.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.md


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

* [Bug target/53141] [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c
  2012-04-27 13:56 [Bug rtl-optimization/53141] New: [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2012-04-30 21:30 ` uros at gcc dot gnu.org
@ 2012-04-30 21:33 ` ubizjak at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-30 21:33 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2012-04/msg01911.htm
                   |                            |l
         Resolution|                            |FIXED

--- Comment #5 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-30 21:33:08 UTC ---
Fixed in a different way, by simply switching places of constraints.


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

end of thread, other threads:[~2012-04-30 21:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 13:56 [Bug rtl-optimization/53141] New: [4.8 Regression] gcc.target/i386/bmi2-mulx32-[12]a.c hjl.tools at gmail dot com
2012-04-27 14:33 ` [Bug rtl-optimization/53141] " krebbel at gcc dot gnu.org
2012-04-27 14:48 ` krebbel at gcc dot gnu.org
2012-04-30  8:19 ` [Bug target/53141] " ubizjak at gmail dot com
2012-04-30 21:30 ` uros at gcc dot gnu.org
2012-04-30 21:33 ` ubizjak 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).