[llvm] r295578 - [TableGen] Make sure EnforceSameSize populates the type sets if necessary.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 18 14:53:38 PST 2017


Author: ctopper
Date: Sat Feb 18 16:53:38 2017
New Revision: 295578

URL: http://llvm.org/viewvc/llvm-project?rev=295578&view=rev
Log:
[TableGen] Make sure EnforceSameSize populates the type sets if necessary.

This was found by another commit I'm working on.

Modified:
    llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp

Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=295578&r1=295577&r2=295578&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Sat Feb 18 16:53:38 2017
@@ -644,6 +644,12 @@ bool EEVT::TypeSet::EnforceSameSize(EEVT
 
   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();




More information about the llvm-commits mailing list