This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/85516] [missed-optimization] gcc does not convert multiple compares against constants to a shift+bitmask test
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Apr 2018 07:26:33 +0000
- Subject: [Bug middle-end/85516] [missed-optimization] gcc does not convert multiple compares against constants to a shift+bitmask test
- Auto-submitted: auto-generated
- References: <bug-85516-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85516
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-04-25
Ever confirmed|0 |1
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
I expected fold_truth_andor to eventually catch this via fold_range_test.
Probably the "bad" association in the testcase prevents this.
Anyway, this is a job for reassoc / if-conversion.