]> granicus.if.org Git - llvm/commitdiff
[TableGen] Make sure EnforceSameSize populates the type sets if necessary.
authorCraig Topper <craig.topper@gmail.com>
Sat, 18 Feb 2017 22:53:38 +0000 (22:53 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 18 Feb 2017 22:53:38 +0000 (22:53 +0000)
This was found by another commit I'm working on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295578 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenDAGPatterns.cpp

index 4eec2e6aa3f08e10cb795f56138e76fbb088c0a8..22c3d490c5a48fecc9af2f0d3e2f5cfab7de7de4 100644 (file)
@@ -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();