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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 14:32:00 PST 2017


efriedma added a comment.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D29845





More information about the llvm-commits mailing list