[PATCH] D31821: Remove redundant copy in recurrences

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 14:03:10 PDT 2017


qcolombet added a comment.

Hi Taewook,

> @qcolombet Actually you're right. Having tied operands, this can be done within SSA. Do you have a suggestion for a better place to implement this? I thought what isRevCopyChain does is most close to what this patch does.

I would investigate this as part of the PeepholeOptimizer. It already massages copies.

Regarding my second question, answered it, with that part:

> If the pattern is observed for both regB and regC, it is possible that not to commute the operands generates better result, but as the logic checks regC first, it'll commute the operands.

Cheers,
-Quentin


https://reviews.llvm.org/D31821





More information about the llvm-commits mailing list