public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/48970] New: Inaccurate comments for processor_costs
@ 2011-05-11 21:22 hjl.tools at gmail dot com
2011-05-11 21:36 ` [Bug target/48970] " hjl.tools at gmail dot com
2021-08-15 5:00 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-11 21:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48970
Summary: Inaccurate comments for processor_costs
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: ubizjak@gmail.com
Target: x86
i386.h has
struct processor_costs {
...
const int sse_load[3]; /* cost of loading SSE register
in SImode, DImode and TImode*/
const int sse_store[3]; /* cost of storing SSE register
in SImode, DImode and TImode*/
But i386.c has
if (SSE_CLASS_P (regclass))
{
int index;
switch (GET_MODE_SIZE (mode))
{
case 4:
index = 0;
break;
case 8:
index = 1;
break;
case 16:
index = 2;
break;
default:
return 100;
}
if (in == 2)
return MAX (ix86_cost->sse_load [index], ix86_cost->sse_store [index]);
return in ? ix86_cost->sse_load [index] : ix86_cost->sse_store [index];
}
SImode, DImode nor TImode aren't used to compute costs.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/48970] Inaccurate comments for processor_costs
2011-05-11 21:22 [Bug target/48970] New: Inaccurate comments for processor_costs hjl.tools at gmail dot com
@ 2011-05-11 21:36 ` hjl.tools at gmail dot com
2021-08-15 5:00 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2011-05-11 21:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48970
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-11 21:23:45 UTC ---
Also
const int mmxsse_to_integer; /* cost of moving mmxsse register to
integer and vice versa. */
isn't limited to integers:
/* Moves between SSE/MMX and integer unit are expensive. */
if (MMX_CLASS_P (class1) != MMX_CLASS_P (class2)
|| SSE_CLASS_P (class1) != SSE_CLASS_P (class2))
/* ??? By keeping returned value relatively high, we limit the number
of moves between integer and MMX/SSE registers for all targets.
Additionally, high value prevents problem with x86_modes_tieable_p(),
where integer modes in MMX/SSE registers are not tieable
because of missing QImode and HImode moves to, from or between
MMX/SSE registers. */
return MAX (8, ix86_cost->mmxsse_to_integer);
Integer register classes aren't checked at all.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/48970] Inaccurate comments for processor_costs
2011-05-11 21:22 [Bug target/48970] New: Inaccurate comments for processor_costs hjl.tools at gmail dot com
2011-05-11 21:36 ` [Bug target/48970] " hjl.tools at gmail dot com
@ 2021-08-15 5:00 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-15 5:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48970
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
const int sse_load[5]; /* cost of loading SSE register
in 32bit, 64bit, 128bit, 256bit and 512bit
*/
const int sse_store[5]; /* cost of storing SSE register
in SImode, DImode and TImode. */
(In reply to H.J. Lu from comment #1)
> Also
>
> const int mmxsse_to_integer; /* cost of moving mmxsse register to
> integer and vice versa. */
This changed with PR 90877.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-15 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-11 21:22 [Bug target/48970] New: Inaccurate comments for processor_costs hjl.tools at gmail dot com
2011-05-11 21:36 ` [Bug target/48970] " hjl.tools at gmail dot com
2021-08-15 5:00 ` pinskia 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).