public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102121] New: switch conversion to load table should do integer compression
@ 2021-08-29 20:43 pinskia at gcc dot gnu.org
2021-08-29 20:44 ` [Bug tree-optimization/102121] " pinskia at gcc dot gnu.org
2021-08-30 7:36 ` marxin at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-29 20:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102121
Bug ID: 102121
Summary: switch conversion to load table should do integer
compression
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Take:
int f(int a)
{
switch (a)
{
case 0:
return 100;
case 1:
return 200;
case 3:
return 250;
case 4:
return 0;
case 5:
return 7;
case 6:
return 3;
}
return 0;
}
int f1(int a)
{
unsigned char t = 0;
switch (a)
{
case 0:
t=100;
break;
case 1:
t = 200u;
break;
case 3:
t = 250u;
break;
case 4:
t = 0;
break;
case 5:
t = 7;
break;
case 6:
t = 3;
break;
}
asm("":"+r"(t));
return t;
}
These two functions should have the same assembly and the load table should be
using byte loads for both.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/102121] switch conversion to load table should do integer compression
2021-08-29 20:43 [Bug tree-optimization/102121] New: switch conversion to load table should do integer compression pinskia at gcc dot gnu.org
@ 2021-08-29 20:44 ` pinskia at gcc dot gnu.org
2021-08-30 7:36 ` marxin at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-29 20:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102121
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
float compression is another one that should be done but I am less worried
about that.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/102121] switch conversion to load table should do integer compression
2021-08-29 20:43 [Bug tree-optimization/102121] New: switch conversion to load table should do integer compression pinskia at gcc dot gnu.org
2021-08-29 20:44 ` [Bug tree-optimization/102121] " pinskia at gcc dot gnu.org
@ 2021-08-30 7:36 ` marxin at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-30 7:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102121
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-08-30
Status|UNCONFIRMED |NEW
CC| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-30 7:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29 20:43 [Bug tree-optimization/102121] New: switch conversion to load table should do integer compression pinskia at gcc dot gnu.org
2021-08-29 20:44 ` [Bug tree-optimization/102121] " pinskia at gcc dot gnu.org
2021-08-30 7:36 ` marxin 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).