[PATCH] D62342: [SelectionDAG] Enhance the simplification of `copyto` from `implicit-def`.
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 05:34:19 PDT 2019
hliao added a comment.
In D62342#1515284 <https://reviews.llvm.org/D62342#1515284>, @nhaehnle wrote:
> I don't think this is correct. If an IMPLICIT_DEF has multiple uses, then the correctness of the program may depend on all uses seeing the same value, even if that value is undefined.
>
> The description also doesn't line up with the test description (which talks about making sure that something doesn't crash).
IMPLICIT_DEF is multi-instantiated in lowering, i.e. each use of it has a dedicated definition of IMPLICIT_DEF (refer to `getDstOfOnlyCopyToRegUse`). The only slight simplification is for the sequence of COPY_TO followed by IMPLICIT_DEF on virtual register dest. In that case, that COPY_TO could be eliminated. IMPLICIT_DEF is just `undef`, the implementation has the right to decide how to do it efficiently.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62342/new/
https://reviews.llvm.org/D62342
More information about the llvm-commits
mailing list