This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/66588] combine should try transforming if_then_else of zero_extends into zero_extend of if_then_else
- From: "segher at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 05 Jul 2015 16:28:13 +0000
- Subject: [Bug middle-end/66588] combine should try transforming if_then_else of zero_extends into zero_extend of if_then_else
- Auto-submitted: auto-generated
- References: <bug-66588-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66588
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
combine should not in general try multiple ways to write the same
thing; this will not scale. In this case, I don't see that some
backends would really like to write it one way and some the other,
so we should just use one way.
There are no defined canonicalization rules for this, but there
are for the similar cases involving MULT, where the extends are
moved inwards as well. This is most in line with how other extends
are treated as well.
We probably should document the canonicalization rules better;
current practice for backends is to just look at what combine does
and use that; not a great idea in my opinion.