[PATCH] D29845: [SelectionDAG] Remove redundant stores more aggressively.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 11:22:30 PST 2017


RKSimon added a comment.

In https://reviews.llvm.org/D29845#680213, @efriedma wrote:

> I took a quick look at why `test2` isn't getting optimized on other platforms.
>
> On x86, we end up with a DAG that looks like `store(trunc(zextload(x)), x)`, and the code that looks for redundant stores doesn't try to look through truncate nodes.  I'm not sure why the no-op OR isn't getting simplified; maybe something isn't getting added to the worklist.
>
> On PPC, the store isn't dead because it's a big-endian target.  We probably need some dedicated optimization before legalization to catch this.


Are there tests that cover the cases in X86/PPC (arm-be?) already or could you add them please? I'd also recommend committing the tests with the current codegen so that this patch can show the diffs.


Repository:
  rL LLVM

https://reviews.llvm.org/D29845





More information about the llvm-commits mailing list