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 ?