Haicheng Wu via llvm-dev
2015-Oct-23 20:43 UTC
[llvm-dev] Missing Opportunity in Machine-CSE
Hi, I find a case that Machine-CSE could but does not perform the optimization bb.1 %24 = MOVi32imm 1 %23 = COPY %24 . bb.3 %38 = MOVi32imm 1 %37 = COPY %38 . bb.5 %7 = PHI %23, %bb.1, %37, %bb.3, . The second MOVi32imm instruction could be eliminated by the CSE, but two COPYs in bb.1 and bb.3 prevent the problem. CSE thinks extending %24 to %37 increases the register pressure. Machine-CSE already supports TrivialCopyPropagation. It seems running this propogation before machine-cse can simply fix this problem. Is there any other advice? Best, Haicheng -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151023/8531c221/attachment.html>