This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/66588] combine should try transforming if_then_else of zero_extends into zero_extend of if_then_else


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 ?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]