On Thu, Nov 29, 2018 at 05:10:33PM +0100, Uros Bizjak wrote: > Maybe a combine splitter can be used here? Please see documentation > from paragraph 17.16 onward: > > --quote-- > The insn combiner phase also splits putative insns. If three insns are > merged into one insn with a complex expression that cannot be matched by > some 'define_insn' pattern, the combiner phase attempts to split the > complex pattern into two insns that are recognized. Usually it can > break the complex pattern into two patterns by splitting out some > subexpression. However, in some other cases, such as performing an > addition of a large constant in two insns on a RISC machine, the way to > split the addition into two insns is machine-dependent.
Maybe, but not sure how the define_split would look like. We essentially want to match any RTL whatsoever that has some MEM in it and if the MEM address is of certain kind, move some part of it. combine.c has also find_split_point function which does the right thing in the foo case, just doesn't for the bar case. Jakub