[PATCH] D35075: [AArch64] Redundant copy elimination - remove more zero copies.

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 12:22:00 PDT 2017


mcrosier added a subscriber: apinski-cavium.
mcrosier added a comment.

In https://reviews.llvm.org/D35075#801162, @apinski-cavium wrote:

> Why did it not produce:
>
>   str wzr, [x2]
>   
>
> Instead?  this saves the one instruction like before and also seems better for some better in general as it is not dependent on the subs.


Yes, with a bit more work that seem very possible.  However, I'd prefer to address that in a subsequent patch.  I can add a FIXME, if you prefer.

As a concrete example of how this might improve codegen, having the str wzr, [x2] could expose additional opportunities for the AArch64 load/store optimization pass to pair/merge more zero stores.


https://reviews.llvm.org/D35075





More information about the llvm-commits mailing list