public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51524] New: [BMI2] New regression on 182266 vs 182257
@ 2011-12-13 7:27 kyukhin at gcc dot gnu.org
2011-12-13 14:07 ` [Bug testsuite/51524] " ubizjak at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2011-12-13 7:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524
Bug #: 51524
Summary: [BMI2] New regression on 182266 vs 182257
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: kyukhin@gcc.gnu.org
Hi,
Seems we've got new regression on trunk:
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] 5+ messages in thread
* [Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257
2011-12-13 7:27 [Bug target/51524] New: [BMI2] New regression on 182266 vs 182257 kyukhin at gcc dot gnu.org
@ 2011-12-13 14:07 ` ubizjak at gmail dot com
2011-12-13 14:45 ` ubizjak at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-13 14:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-12-13
Component|target |testsuite
Ever Confirmed|0 |1
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-13 14:02:33 UTC ---
Actually, not a bug but problem with the testcase.
Previously, %edx was allocated for temporary, resulting in:
gen_mulx:
.LFB30:
.cfi_startproc
#(insn:TI 20 4 23 2 (set (reg/v:SI 1 dx [orig:64 b ] [64])
# (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
# (const_int 8 [0x8])) [2 b+0 S4 A32])) bmi2-mulx32-1.c:24 64
{*movsi_internal}
# (expr_list:REG_EQUIV (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
# (const_int 8 [0x8])) [2 b+0 S4 A32])
# (nil)))
movl 8(%esp), %edx # 20 *movsi_internal/1 [length = 4]
#(insn:TI 23 20 17 2 (parallel [
# (set (reg:SI 0 ax [65])
# (mult:SI (reg/v:SI 1 dx [orig:64 b ] [64])
# (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
# (const_int 4 [0x4])) [2 a+0 S4 A32])))
# (set (reg:SI 1 dx [+4 ])
# (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (reg/v:SI 1
dx [orig:64 b ] [64]))
# (zero_extend:DI (mem/c/i:SI (plus:SI (reg/f:SI 7
sp)
# (const_int 4 [0x4])) [2 a+0 S4 A32])))
# (const_int 32 [0x20]))))
# ]) bmi2-mulx32-1.c:24 337 {*bmi2_umulsidi3_1}
# (nil))
mulx 4(%esp), %eax, %edx # 23 *bmi2_umulsidi3_1 [length = 7]
But now, %eax gets allocated as temporary, resulting in:
gen_mulx:
.LFB30:
.cfi_startproc
#(insn:TI 20 4 9 2 (set (reg/v:SI 0 ax [orig:64 b ] [64])
# (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
# (const_int 8 [0x8])) [2 b+0 S4 A32])) bmi2-mulx32-1.c:24 64
{*movsi_internal}
# (expr_list:REG_EQUIV (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
# (const_int 8 [0x8])) [2 b+0 S4 A32])
# (nil)))
movl 8(%esp), %eax # 20 *movsi_internal/1 [length = 4]
#(insn:TI 9 20 17 2 (parallel [
# (set (reg:DI 0 ax [65])
# (mult:DI (zero_extend:DI (reg/v:SI 0 ax [orig:64 b ] [64]))
# (zero_extend:DI (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
# (const_int 4 [0x4])) [2 a+0 S4 A32]))))
# (clobber (reg:CC 17 flags))
# ]) bmi2-mulx32-1.c:24 338 {*umulsidi3_1}
# (expr_list:REG_UNUSED (reg:CC 17 flags)
# (nil)))
mull 4(%esp) # 9 *umulsidi3_1/1 [length = 4]
(The latter version is IMO even better in this case).
A testcase should be fixed to force bmi2 alternative in:
(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))]
"!(MEM_P (operands[1]) && MEM_P (operands[2]))"
"@
mul{<imodesuffix>}\t%2
#"
[(set_attr "isa" "*,bmi2")
...
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257
2011-12-13 7:27 [Bug target/51524] New: [BMI2] New regression on 182266 vs 182257 kyukhin at gcc dot gnu.org
2011-12-13 14:07 ` [Bug testsuite/51524] " ubizjak at gmail dot com
@ 2011-12-13 14:45 ` ubizjak at gmail dot com
2011-12-13 15:07 ` uros at gcc dot gnu.org
2011-12-13 15:24 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-13 14:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524
--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-13 14:21:37 UTC ---
Index: gcc.target/i386/bmi2-mulx32-1.c
===================================================================
--- gcc.target/i386/bmi2-mulx32-1.c (revision 182271)
+++ gcc.target/i386/bmi2-mulx32-1.c (working copy)
@@ -15,7 +15,7 @@
return res;
}
-__attribute__((noinline))
+__attribute__((noinline, regparm (2)))
unsigned long long
gen_mulx (unsigned a, unsigned b)
{
Index: gcc.target/i386/bmi2-mulx32-2.c
===================================================================
--- gcc.target/i386/bmi2-mulx32-2.c (revision 182271)
+++ gcc.target/i386/bmi2-mulx32-2.c (working copy)
@@ -17,7 +17,7 @@
return res;
}
-__attribute__((noinline))
+__attribute__((noinline, regparm (2)))
unsigned calc_mulx_u32 (unsigned x, unsigned y, unsigned *res_h)
{
return (unsigned) _mulx_u32 (x, y, res_h);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257
2011-12-13 7:27 [Bug target/51524] New: [BMI2] New regression on 182266 vs 182257 kyukhin at gcc dot gnu.org
2011-12-13 14:07 ` [Bug testsuite/51524] " ubizjak at gmail dot com
2011-12-13 14:45 ` ubizjak at gmail dot com
@ 2011-12-13 15:07 ` uros at gcc dot gnu.org
2011-12-13 15:24 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: uros at gcc dot gnu.org @ 2011-12-13 15:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524
--- Comment #3 from uros at gcc dot gnu.org 2011-12-13 15:00:19 UTC ---
Author: uros
Date: Tue Dec 13 15:00:09 2011
New Revision: 182287
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182287
Log:
PR testsuite/51524
* gcc.target/i386/bmi2-mulx32-1.c (gen_mulx): Add attribute regparm(2).
* gcc.target/i386/bmi2-mulx32-2.c (calc_mulx_u32): Ditto.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/bmi2-mulx32-1.c
trunk/gcc/testsuite/gcc.target/i386/bmi2-mulx32-2.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257
2011-12-13 7:27 [Bug target/51524] New: [BMI2] New regression on 182266 vs 182257 kyukhin at gcc dot gnu.org
` (2 preceding siblings ...)
2011-12-13 15:07 ` uros at gcc dot gnu.org
@ 2011-12-13 15:24 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-13 15:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-13 15:06:22 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-13 15:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-13 7:27 [Bug target/51524] New: [BMI2] New regression on 182266 vs 182257 kyukhin at gcc dot gnu.org
2011-12-13 14:07 ` [Bug testsuite/51524] " ubizjak at gmail dot com
2011-12-13 14:45 ` ubizjak at gmail dot com
2011-12-13 15:07 ` uros at gcc dot gnu.org
2011-12-13 15:24 ` 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).