[PATCH] D53201: [DAGCombiner] reduce insert+bitcast+extract vector ops to truncate (PR39016)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 14 07:50:23 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D53201#1264513, @craig.topper wrote:

> FYI, the post legalize types DAG combine doesn’t run if all the types in the DAG were legal and nothing was changed by legalize types. So gating a combine on LegalTypes can really mean a transform doesn’t run until after vector op legalization(again the DAG combine after this doesn’t run if nothing changed) or LegalizeDAG.


OK, didn't realize that limitation, although it still catches all of the cases that I've added here. Suggestions for a more appropriate predicate?
We could confirm that the type that we're casting to is legal:
TLI.isTypeLegal(NVT) ?


https://reviews.llvm.org/D53201





More information about the llvm-commits mailing list