This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/46935] We should recognize expanded switch statement and convert 2 way switch statements into shift & mask test
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Dec 2010 14:14:30 +0000
- Subject: [Bug middle-end/46935] We should recognize expanded switch statement and convert 2 way switch statements into shift & mask test
- Auto-submitted: auto-generated
- References: <bug-46935-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46935
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.14 14:14:18
Ever Confirmed|0 |1
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-12-14 14:14:18 UTC ---
I would do the conversion always when we can turn more than one if into signle
switch. Doing so reduces the amount of IL and makes program easier to
analyze&opotimize. We should rely on switch expansion code doing the right
thing producing back the ifs when profitable.