This patch checks allows immediate then/else operands for cmovs.
We rely on,emit_conditional_move returning NULL if something unsupported
was generated.
Also, minor refactoring is performed.
--
gcc/ChangeLog:
2018-11-14 Robin Dapp
* ifcvt.c (have_const_cmov): New function.
(
Robin Dapp writes:
> This patch checks allows immediate then/else operands for cmovs.
> We rely on,emit_conditional_move returning NULL if something unsupported
> was generated.
It seems like this is making noce_convert_multiple_sets overlap
a lot with cond_move_process_if_block (although that us
> It seems like this is making noce_convert_multiple_sets overlap
> a lot with cond_move_process_if_block (although that uses CONSTANT_P
> instead of CONST_INT_P). How do they fit together after this patch,
> i.e. which cases is each one meant to handle that the other doesn't?
IMHO all of icvt is
Coming back to this just in time for it not to be three months later,
sorry...
I still think it would be better to consolidate ifcvt a bit more,
rather than effectively duplicate bits of cond_move_process_if_block
in noce_convert_multiple_sets. But perhaps it was a historical
mistake to have two