Changes in directory llvm/lib/VMCore:
Instruction.cpp updated: 1.54 -> 1.55 --- Log message: Fix Transforms/InstCombine/2006-10-26-VectorReassoc.ll --- Diffs of the changes: (+6 -5) Instruction.cpp | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.54 llvm/lib/VMCore/Instruction.cpp:1.55 --- llvm/lib/VMCore/Instruction.cpp:1.54 Thu Oct 26 01:15:43 2006 +++ llvm/lib/VMCore/Instruction.cpp Thu Oct 26 13:27:26 2006 @@ -172,11 +172,12 @@ /// applied to floating point types. /// bool Instruction::isAssociative(unsigned Opcode, const Type *Ty) { - if (Opcode == Add || Opcode == Mul || - Opcode == And || Opcode == Or || Opcode == Xor) { - // Floating point operations do not associate! - return !Ty->isFloatingPoint(); - } + if (Opcode == And || Opcode == Or || Opcode == Xor) + return true; + + // Add/Mul reassociate unless they are FP or FP vectors. + if (Opcode == Add || Opcode == Mul) + return !Ty->isFPOrFPVector(); return 0; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits