public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/41665] New: Typo in addsi_1_zext?
@ 2009-10-10 18:11 hjl dot tools at gmail dot com
2009-10-10 18:29 ` [Bug target/41665] " hjl dot tools at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-10-10 18:11 UTC (permalink / raw)
To: gcc-bugs
There are
(define_insn "addsi_1_zext"
[(set (match_operand:DI 0 "register_operand" "=r,r")
(zero_extend:DI
(plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,r")
(match_operand:SI 2 "general_operand" "g,li"))))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && ix86_binary_operator_ok (PLUS, SImode, operands)"
{
switch (get_attr_type (insn))
{
case TYPE_LEA:
operands[2] = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
return "lea{l}\t{%a2, %k0|%k0, %a2}";
case TYPE_INCDEC:
if (operands[2] == const1_rtx)
return "inc{l}\t%k0";
else
{
gcc_assert (operands[2] == constm1_rtx);
return "dec{l}\t%k0";
}
default:
/* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
Exceptions: -128 encodes smaller than 128, so swap sign and op. */
if (CONST_INT_P (operands[2])
&& (INTVAL (operands[2]) == 128
|| (INTVAL (operands[2]) < 0
&& INTVAL (operands[2]) != -128)))
{
operands[2] = GEN_INT (-INTVAL (operands[2]));
return "sub{l}\t{%2, %k0|%k0, %2}";
}
return "add{l}\t{%2, %k0|%k0, %2}";
}
}
Shouldn't it be
(plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0")
Am I missing something?
--
Summary: Typo in addsi_1_zext?
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: x86_64-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/41665] Typo in addsi_1_zext?
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
@ 2009-10-10 18:29 ` hjl dot tools at gmail dot com
2009-10-10 18:31 ` ubizjak at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-10-10 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from hjl dot tools at gmail dot com 2009-10-10 18:29 -------
Never mind. alternative starts at 0.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/41665] Typo in addsi_1_zext?
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
2009-10-10 18:29 ` [Bug target/41665] " hjl dot tools at gmail dot com
@ 2009-10-10 18:31 ` ubizjak at gmail dot com
2009-10-10 18:57 ` hjl dot tools at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2009-10-10 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ubizjak at gmail dot com 2009-10-10 18:30 -------
(In reply to comment #0)
> Am I missing something?
The part of manual where lea is described, perhaps? ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/41665] Typo in addsi_1_zext?
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
2009-10-10 18:29 ` [Bug target/41665] " hjl dot tools at gmail dot com
2009-10-10 18:31 ` ubizjak at gmail dot com
@ 2009-10-10 18:57 ` hjl dot tools at gmail dot com
2009-10-11 12:13 ` ubizjak at gmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-10-10 18:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hjl dot tools at gmail dot com 2009-10-10 18:57 -------
For
case TYPE_LEA:
operands[2] = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
return "lea{l}\t{%a2, %k0|%k0, %a2}";
Won't we get "(zero_extend:DI ...)" for operands[2]? Don't we
want "(plus:SI ...)" instead?
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/41665] Typo in addsi_1_zext?
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
` (2 preceding siblings ...)
2009-10-10 18:57 ` hjl dot tools at gmail dot com
@ 2009-10-11 12:13 ` ubizjak at gmail dot com
2009-10-11 14:28 ` hjl dot tools at gmail dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2009-10-11 12:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from ubizjak at gmail dot com 2009-10-11 12:13 -------
(In reply to comment #3)
> case TYPE_LEA:
> operands[2] = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
> return "lea{l}\t{%a2, %k0|%k0, %a2}";
>
> Won't we get "(zero_extend:DI ...)" for operands[2]? Don't we
> want "(plus:SI ...)" instead?
You are right here. We need to strip ZERO_EXTEND, otherwise
print_operand_address will choke on it. Care to post a patch?
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-10-11 12:13:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/41665] Typo in addsi_1_zext?
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
` (3 preceding siblings ...)
2009-10-11 12:13 ` ubizjak at gmail dot com
@ 2009-10-11 14:28 ` hjl dot tools at gmail dot com
2009-10-11 19:43 ` hjl at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-10-11 14:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hjl dot tools at gmail dot com 2009-10-11 14:28 -------
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00693.html
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2009-
| |10/msg00693.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/41665] Typo in addsi_1_zext?
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
` (4 preceding siblings ...)
2009-10-11 14:28 ` hjl dot tools at gmail dot com
@ 2009-10-11 19:43 ` hjl at gcc dot gnu dot org
2009-10-15 14:01 ` hjl at gcc dot gnu dot org
2009-10-15 14:06 ` hjl dot tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-10-11 19:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hjl at gcc dot gnu dot org 2009-10-11 19:43 -------
Subject: Bug 41665
Author: hjl
Date: Sun Oct 11 19:42:54 2009
New Revision: 152647
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152647
Log:
2009-10-11 H.J. Lu <hongjiu.lu@intel.com>
PR target/41665
* config/i386/i386.md (addsi_1_zext): Get the proper second
operand for lea.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/41665] Typo in addsi_1_zext?
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
` (5 preceding siblings ...)
2009-10-11 19:43 ` hjl at gcc dot gnu dot org
@ 2009-10-15 14:01 ` hjl at gcc dot gnu dot org
2009-10-15 14:06 ` hjl dot tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-10-15 14:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hjl at gcc dot gnu dot org 2009-10-15 14:01 -------
Subject: Bug 41665
Author: hjl
Date: Thu Oct 15 14:00:57 2009
New Revision: 152845
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152845
Log:
2009-10-15 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
2009-10-11 H.J. Lu <hongjiu.lu@intel.com>
PR target/41665
* config/i386/i386.md (addsi_1_zext): Get the proper second
operand for lea.
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/config/i386/i386.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/41665] Typo in addsi_1_zext?
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
` (6 preceding siblings ...)
2009-10-15 14:01 ` hjl at gcc dot gnu dot org
@ 2009-10-15 14:06 ` hjl dot tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-10-15 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hjl dot tools at gmail dot com 2009-10-15 14:05 -------
Fixed.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-10-15 14:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-10 18:11 [Bug target/41665] New: Typo in addsi_1_zext? hjl dot tools at gmail dot com
2009-10-10 18:29 ` [Bug target/41665] " hjl dot tools at gmail dot com
2009-10-10 18:31 ` ubizjak at gmail dot com
2009-10-10 18:57 ` hjl dot tools at gmail dot com
2009-10-11 12:13 ` ubizjak at gmail dot com
2009-10-11 14:28 ` hjl dot tools at gmail dot com
2009-10-11 19:43 ` hjl at gcc dot gnu dot org
2009-10-15 14:01 ` hjl at gcc dot gnu dot org
2009-10-15 14:06 ` hjl dot tools 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).