diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 52c47f5e514..01a6335a163 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -2637,6 +2637,8 @@ static bool OnlyOnRHSOfCommutative(TreePatternNode *N) { return true; if (N->isLeaf() && isa(N->getLeafValue())) return true; + if (isImmAllOnesAllZerosMatch(N)) + return true; return false; }