This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes] Stop DAGTypeLegalizer::getSETCCWidenedResultTy from creating illegal setccs. Add checks for valid setccs
ClosedPublic

Authored by craig.topper on Oct 25 2018, 9:00 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Oct 25 2018, 9:00 PM
This revision is now accepted and ready to land.Oct 26 2018, 10:55 AM
This revision was automatically updated to reflect the committed changes.