craig.topper added a comment. In D61472#1515994 <https://reviews.llvm.org/D61472#1515994>, @spatel wrote:
> I haven't looked closely at the series of transforms that gets us here, so > let me ask: would it be more efficient to produce the add/inc/dec machine > instructions directly rather than LEA? Or do we do this because the 3-address > opportunity helps register allocation, so this late reversal is a > special-case of the more generally useful transforms that produce LEA in the > 1st place? I believe a lot of these are caused TwoAddressInstructionPass converting to three address sometimes when it maybe shouldn't. I think there's some overlap with the test diffs in D52109 <https://reviews.llvm.org/D52109>. But I don't think the change I made in that diff is correct. There appear to be some test changes here that aren't affected by that patch either. So maybe there are other issues in TwoAddressInstruction heuristics. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61472/new/ https://reviews.llvm.org/D61472 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits