[PatternMatch][InstCombine] match a vector with constant expression element(s) as a constant expression

The InstCombine test is reduced from issue #56601. Without the more
liberal match for ConstantExpr, we try to rearrange constants in
Negator forever.

Alternatively, we could adjust the definition of m_ImmConstant to be
more conservative, but that's probably a larger patch, and I don't
see any downside to changing m_ConstantExpr. We never capture and
modify a ConstantExpr; transforms just want to avoid it.

Differential Revision: https://reviews.llvm.org/D130286
diff --git a/llvm/unittests/IR/PatternMatch.cpp b/llvm/unittests/IR/PatternMatch.cpp
index 9314e67..05456ee 100644
--- a/llvm/unittests/IR/PatternMatch.cpp
+++ b/llvm/unittests/IR/PatternMatch.cpp
@@ -1798,8 +1798,10 @@
   PoisonValue *P = PoisonValue::get(VecTy);
   Constant *V = ConstantExpr::getInsertElement(P, S, IRB.getInt32(0));
 
+  // The match succeeds on a constant that is a constant expression itself
+  // or a constant that contains a constant expression.
   EXPECT_TRUE(match(S, m_ConstantExpr()));
-  EXPECT_FALSE(match(V, m_ConstantExpr()));
+  EXPECT_TRUE(match(V, m_ConstantExpr()));
 }
 
 } // anonymous namespace.