From f6564c991b0bf67d3cdb0cd5b000ddbb0f6e56bd Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 18 Feb 2017 22:53:38 +0000 Subject: [PATCH] [TableGen] Make sure EnforceSameSize populates the type sets if necessary. This was found by another commit I'm working on. llvm-svn: 295578 --- llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index 4eec2e6aa3f0..22c3d490c5a4 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -644,6 +644,12 @@ bool EEVT::TypeSet::EnforceSameSize(EEVT::TypeSet &VTOperand, bool MadeChange = false; + if (isCompletelyUnknown()) + MadeChange = FillWithPossibleTypes(TP); + + if (VTOperand.isCompletelyUnknown()) + MadeChange = VTOperand.FillWithPossibleTypes(TP); + // If we know one of the types, it forces the other type agree. if (isConcrete()) { MVT IVT = getConcrete();