From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25426 invoked by alias); 13 Dec 2011 14:03:27 -0000 Received: (qmail 25060 invoked by uid 22791); 13 Dec 2011 14:03:23 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_ZJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Dec 2011 14:03:10 +0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257 Date: Tue, 13 Dec 2011 14:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Component Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-12/txt/msg01363.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524 Uros Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-12-13 Component|target |testsuite Ever Confirmed|0 |1 --- Comment #1 from Uros Bizjak 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 "*umul3_1" [(set (match_operand: 0 "register_operand" "=A,r") (mult: (zero_extend: (match_operand:DWIH 1 "nonimmediate_operand" "%0,d")) (zero_extend: (match_operand:DWIH 2 "nonimmediate_operand" "rm,rm")))) (clobber (reg:CC FLAGS_REG))] "!(MEM_P (operands[1]) && MEM_P (operands[2]))" "@ mul{}\t%2 #" [(set_attr "isa" "*,bmi2") ...