Hack on vectors too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2008-02-03 08:19:11 +00:00
parent b6eabff169
commit 0c2c3f6e81

View File

@ -2124,7 +2124,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
return R;
// W*X + Y*Z --> W * (X+Z) iff W == Y
if (I.getType()->isInteger()) {
if (I.getType()->isIntOrIntVector()) {
Value *W, *X, *Y, *Z;
if (match(LHS, m_Mul(m_Value(W), m_Value(X))) &&
match(RHS, m_Mul(m_Value(Y), m_Value(Z)))) {