Fix EnforceSmallerThan to check !hasVectorTypes on the other type instead of this type to force this type to be scalar.
llvm-svn: 200070
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 6941732..3f165b5 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -371,7 +371,7 @@
// If one contains vectors but the other doesn't pull vectors out.
if (!hasVectorTypes())
MadeChange |= Other.EnforceScalar(TP);
- if (!hasVectorTypes())
+ if (!Other.hasVectorTypes())
MadeChange |= EnforceScalar(TP);
if (TypeVec.size() == 1 && Other.TypeVec.size() == 1) {