Hack on vectors too.
authorNick Lewycky <nicholas@mxc.ca>
Sun, 3 Feb 2008 08:19:11 +0000 (08:19 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 3 Feb 2008 08:19:11 +0000 (08:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46684 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 761b57d2ec73bdc9aab42ad6bcfc8860e4759181..404b53db863d32e07a5650f28f43d6ef742d6492 100644 (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)))) {