Hi! Sorry for the tardiness.
On Fri, Jul 22, 2022 at 03:07:55PM +0800, HAO CHEN GUI wrote: > This patch creates a new function - change_pseudo_and_mask. If recog fails, > the function converts a single pseudo to the pseudo AND with a mask if the > outer operator is IOR/XOR/PLUS and inner operator is ASHIFT or AND. The > conversion helps pattern to match rotate and mask insn on some targets. The name isn't so clear. It isn't changing a mask, to start with. > +/* When the outer code of set_src is IOR/XOR/PLUS and the inner code is > + ASHIFT/AND, "When the outercode of the SET_SRC of PAT is ..." > convert a pseudo to pseudo AND with a mask if its nonzero_bits > + is less than its mode mask. The nonzero_bits in later passes is not a > + superset of what is known in combine pass. So an insn with nonzero_bits > + can't be recoged later. */ Can this not be done with a splitter in the machine description? Segher