[PATCH] D42097: [SelectionDAG] Convert assert to condtion

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 01:23:54 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL322823: [SelectionDAG] Convert assert to condtion (authored by sam_parker, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D42097?vs=129930&id=130368#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42097

Files:
  llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp


Index: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -171,10 +171,9 @@
 SDValue DAGTypeLegalizer::ScalarizeVecRes_BITCAST(SDNode *N) {
   SDValue Op = N->getOperand(0);
   if (Op.getValueType().isVector()
-      && Op.getValueType().getVectorNumElements() == 1) {
-    assert(!isSimpleLegalType(Op.getValueType()));
+      && Op.getValueType().getVectorNumElements() == 1
+      && !isSimpleLegalType(Op.getValueType()))
     Op = GetScalarizedVector(Op);
-  }
   EVT NewVT = N->getValueType(0).getVectorElementType();
   return DAG.getNode(ISD::BITCAST, SDLoc(N),
                      NewVT, Op);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42097.130368.patch
Type: text/x-patch
Size: 812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180118/a5bd3b30/attachment.bin>


More information about the llvm-commits mailing list