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: "ktkachov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Jun 2015 08:26:02 +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
--- Comment #3 from ktkachov at gcc dot gnu.org ---
(In reply to UroÅ Bizjak from comment #2)
> (In reply to UroÅ Bizjak from comment #1)
> > BTW: x86_64 is missing any form of zero-extended cmove.
>
> ... please see [1] how x86_64 implements it (*movsicc_noc_zext).
>
> [1] https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01306.html
Thanks. As I mentioned in the original post this approach does work.
I was just hoping to argue that combine should automatically try both the
(zero_extend (if_then_else a b c))
and
(if_then_else a (zero_extend b) (zero_extend c))
In fact, wouldn't transforming:
(if_then_else a (zero_extend b) (zero_extend c))
into
(zero_extend (if_then_else a b c))
be considered a simplification
suitable for simplify-rtx.c ?