OSDN Git Service

[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)
commit556cad18dba3a3b7ed84195e3597423b3fd17080
tree9aa9b1b913215df6b45ddcfe5a846c103b7738dc
parent151762554372980bc5606884dd937e3609c09dde
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345428 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp