Fix Transforms/Reassociate/2006-04-27-ReassociateVector.ll
authorChris Lattner <sabre@nondot.org>
Fri, 28 Apr 2006 04:14:49 +0000 (04:14 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 28 Apr 2006 04:14:49 +0000 (04:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28007 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/Reassociate.cpp

index e495ffafbb9b2e0380fa5431495f2957d9845c99..353cd1435a6586ec69d8f76bfbcda21d7b7269ce 100644 (file)
 #define DEBUG_TYPE "reassociate"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Constants.h"
+#include "llvm/DerivedTypes.h"
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
 #include "llvm/Pass.h"
-#include "llvm/Type.h"
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Support/Debug.h"
@@ -754,7 +754,8 @@ void Reassociate::ReassociateBB(BasicBlock *BB) {
       }
 
     // Reject cases where it is pointless to do this.
-    if (!isa<BinaryOperator>(BI) || BI->getType()->isFloatingPoint())
+    if (!isa<BinaryOperator>(BI) || BI->getType()->isFloatingPoint() ||
+        isa<PackedType>(BI->getType()))
       continue;  // Floating point ops are not associative.
 
     // If this is a subtract instruction which is not already in negate form,