Roman Zhuykov wrote: > Memory is used instead of a register to store doloop counter.
Yes, this can happen, and your doloop insn pattern *must* be able to handle this. This is usually done via a splitter (and possibly an additional scratch register allocated via an extra insn operand). See various other doloop implementations for examples, like s390 or rs6000. (The reason why the register allocator and/or reload cannot fix this is: the doloop counter is an *output* as well as an input to the isns, therefore it would require an output reload to fix; however, the doloop insn is also a *jump* pattern, and those must never have output reloads, since reload has no place to put them.) Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE ulrich.weig...@de.ibm.com