diff options
author | Craig Topper <craig.topper@intel.com> | 2018-09-23 21:17:56 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-09-23 21:17:56 +0000 |
commit | b3b94a8e8b597b98cba58f88e681058ec4568d7d (patch) | |
tree | 5945854ef205ee7027906e136ebcbddedd1a581f /llvm/lib/CodeGen | |
parent | bec59671768885ab075ef3847ce988ba05904eb5 (diff) | |
download | bcm5719-llvm-b3b94a8e8b597b98cba58f88e681058ec4568d7d.tar.gz bcm5719-llvm-b3b94a8e8b597b98cba58f88e681058ec4568d7d.zip |
[DAGCombiner] Clarify a comment. NFC
This comment was misleading about why we were restricting to before legalize types. The reason given would only apply to before legalize ops. But there is a before legalize types reason that should also be listed.
llvm-svn: 342851
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index d09efca5e43..b80a78c9a0d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -9843,8 +9843,10 @@ SDValue DAGCombiner::visitBITCAST(SDNode *N) { return DAG.getUNDEF(VT); // If the input is a BUILD_VECTOR with all constant elements, fold this now. - // Only do this before legalize, since afterward the target may be depending - // on the bitconvert. + // Only do this before legalize types, since we might create an illegal + // scalar type. Even if we knew we wouldn't create an illegal scalar type + // we can only do this before legalize ops, since the target maybe + // depending on the bitcast. // First check to see if this is all constant. if (!LegalTypes && N0.getOpcode() == ISD::BUILD_VECTOR && N0.getNode()->hasOneUse() && |