[LegalizeTypes] Stop DAGTypeLegalizer::getSETCCWidenedResultTy from creating illegal...
authorCraig Topper <craig.topper@intel.com>
Fri, 26 Oct 2018 20:59:55 +0000 (20:59 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 26 Oct 2018 20:59:55 +0000 (20:59 +0000)
commit7bf85f5c8dd1a6d49581eaf1fdd489eac79e2115
tree5476ac9dc36b51f6b1aa09bf2f747b64599501c0
parentcf477f4e41d5676ee15444244e2f74d9418b6b68
[LegalizeTypes] Stop DAGTypeLegalizer::getSETCCWidenedResultTy from creating illegal setccs. Add checks for valid setccs

The DAGTypeLegalizer::getSETCCWidenedResultTy was widening the MaskVT, but the code in convertMask called after getSETCCWidenedResultTy had no idea this widening had occurred. So none of the operands were widened when convertMask created new setccs with the widened VT.

This patch removes the widening and adds some asserts to getNode to validate the types of setccs to prevent issues like this in the future.

Differential Revision: https://reviews.llvm.org/D53743

llvm-svn: 345428
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp