public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/50302] New: inefficient float->double conversion in AVX with -mtune=generic
@ 2011-09-05 23:08 andi-gcc at firstfloor dot org
2011-09-06 7:53 ` [Bug target/50302] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: andi-gcc at firstfloor dot org @ 2011-09-05 23:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50302
Bug #: 50302
Summary: inefficient float->double conversion in AVX with
-mtune=generic
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: andi-gcc@firstfloor.org
I noticed that with AVX and -mtune=generic and converting a single float to a
double gcc still generates
vunpcklps reg,reg
vcvtps2pd reg,reg
instead of the more straight forward and likely more power efficient
vcvtss2sd reg,reg
AFAIK the first sequence was only needed on some older AMD CPUs with SSE
to avoid a conversion penalty, does it really still make sense for AVX?
Perhaps that should be fixed for tune=generic ?
Test case:
#include <stdio.h>
float a = 1, b = 2;
float c;
int main(void)
{
c = a + b;
printf("%f\n", c);
return 0;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/50302] inefficient float->double conversion in AVX with -mtune=generic
2011-09-05 23:08 [Bug target/50302] New: inefficient float->double conversion in AVX with -mtune=generic andi-gcc at firstfloor dot org
@ 2011-09-06 7:53 ` rguenth at gcc dot gnu.org
2011-10-07 5:52 ` andi-gcc at firstfloor dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-09-06 7:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50302
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-09-06
CC| |harsha.jagasia at amd dot
| |com, hubicka at gcc dot
| |gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-06 07:51:46 UTC ---
Good question. Probably even with -msseN we could tweak some generic settings
when we know no "old" CPUs have those issues. Of course the question is
whether
we still need to care for those today or whether we should simply change
generic.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/50302] inefficient float->double conversion in AVX with -mtune=generic
2011-09-05 23:08 [Bug target/50302] New: inefficient float->double conversion in AVX with -mtune=generic andi-gcc at firstfloor dot org
2011-09-06 7:53 ` [Bug target/50302] " rguenth at gcc dot gnu.org
@ 2011-10-07 5:52 ` andi-gcc at firstfloor dot org
2011-10-07 5:58 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: andi-gcc at firstfloor dot org @ 2011-10-07 5:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50302
Andi Kleen <andi-gcc at firstfloor dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
--- Comment #2 from Andi Kleen <andi-gcc at firstfloor dot org> 2011-10-07 05:47:54 UTC ---
Was actually a dup of the GC problem.
I tried fixing the one-off cache, but it didn't fix the fragmentation
*** This bug has been marked as a duplicate of bug 50636 ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/50302] inefficient float->double conversion in AVX with -mtune=generic
2011-09-05 23:08 [Bug target/50302] New: inefficient float->double conversion in AVX with -mtune=generic andi-gcc at firstfloor dot org
2011-09-06 7:53 ` [Bug target/50302] " rguenth at gcc dot gnu.org
2011-10-07 5:52 ` andi-gcc at firstfloor dot org
@ 2011-10-07 5:58 ` jakub at gcc dot gnu.org
2011-10-07 14:42 ` andi-gcc at firstfloor dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-07 5:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50302
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
CC| |jakub at gcc dot gnu.org
Resolution|DUPLICATE |
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-07 05:57:40 UTC ---
(In reply to comment #2)
> Was actually a dup of the GC problem.
>
> I tried fixing the one-off cache, but it didn't fix the fragmentation
>
> *** This bug has been marked as a duplicate of bug 50636 ***
This is hardly a dup of PR50636.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/50302] inefficient float->double conversion in AVX with -mtune=generic
2011-09-05 23:08 [Bug target/50302] New: inefficient float->double conversion in AVX with -mtune=generic andi-gcc at firstfloor dot org
` (2 preceding siblings ...)
2011-10-07 5:58 ` jakub at gcc dot gnu.org
@ 2011-10-07 14:42 ` andi-gcc at firstfloor dot org
2014-09-26 18:01 ` andi-gcc at firstfloor dot org
2014-09-27 4:30 ` andi-gcc at firstfloor dot org
5 siblings, 0 replies; 7+ messages in thread
From: andi-gcc at firstfloor dot org @ 2011-10-07 14:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50302
--- Comment #4 from Andi Kleen <andi-gcc at firstfloor dot org> 2011-10-07 14:40:02 UTC ---
Sorry yes my mistake.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/50302] inefficient float->double conversion in AVX with -mtune=generic
2011-09-05 23:08 [Bug target/50302] New: inefficient float->double conversion in AVX with -mtune=generic andi-gcc at firstfloor dot org
` (3 preceding siblings ...)
2011-10-07 14:42 ` andi-gcc at firstfloor dot org
@ 2014-09-26 18:01 ` andi-gcc at firstfloor dot org
2014-09-27 4:30 ` andi-gcc at firstfloor dot org
5 siblings, 0 replies; 7+ messages in thread
From: andi-gcc at firstfloor dot org @ 2014-09-26 18:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50302
--- Comment #5 from Andi Kleen <andi-gcc at firstfloor dot org> ---
Problem is still there on
gcc version 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/50302] inefficient float->double conversion in AVX with -mtune=generic
2011-09-05 23:08 [Bug target/50302] New: inefficient float->double conversion in AVX with -mtune=generic andi-gcc at firstfloor dot org
` (4 preceding siblings ...)
2014-09-26 18:01 ` andi-gcc at firstfloor dot org
@ 2014-09-27 4:30 ` andi-gcc at firstfloor dot org
5 siblings, 0 replies; 7+ messages in thread
From: andi-gcc at firstfloor dot org @ 2014-09-27 4:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50302
Andi Kleen <andi-gcc at firstfloor dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Andi Kleen <andi-gcc at firstfloor dot org> ---
Seems to be fixed now in
gcc version 5.0.0 20140926 (experimental) (GCC)
The double conversion is only generated for -mtune=amdfam10, but not for
mtune=generic
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-09-27 4:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05 23:08 [Bug target/50302] New: inefficient float->double conversion in AVX with -mtune=generic andi-gcc at firstfloor dot org
2011-09-06 7:53 ` [Bug target/50302] " rguenth at gcc dot gnu.org
2011-10-07 5:52 ` andi-gcc at firstfloor dot org
2011-10-07 5:58 ` jakub at gcc dot gnu.org
2011-10-07 14:42 ` andi-gcc at firstfloor dot org
2014-09-26 18:01 ` andi-gcc at firstfloor dot org
2014-09-27 4:30 ` andi-gcc at firstfloor dot 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).