mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Fix Transforms/InstCombine/2006-10-26-VectorReassoc.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -172,11 +172,12 @@ bool Instruction::isIdenticalTo(Instruction *I) const {
|
||||
/// 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user