On Tue, May 12, 2015 at 09:20:18AM +0100, Kyrill Tkachov wrote: > Does this patch means we can remove any patterns in > the backend that look like: > > - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") > - (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") > - (match_operand:SI 2 "const_int_operand" "i") > - (match_operand:SI 3 "const_int_operand" "i")))] > > > as long as we have an equivalent and-with-mask pattern?
Yes, exactly. But you can also keep them, it will find either. Older / CISC targets will usually want the zero_ext*, newer / RISC targets will more often write something as AND (and LSHIFTRT). You can also have both in the same target: for example, many targets will want to write their plain zero_extend patterns as that, because you want to allow both mem and reg in the same pattern, for reload. Segher