diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp index a4659da7e8073..2aa4ef8e73260 100644 --- a/llvm/lib/IR/Instruction.cpp +++ b/llvm/lib/IR/Instruction.cpp @@ -436,17 +436,17 @@ static bool haveSameSpecialState(const Instruction *I1, const Instruction *I2, if (const AllocaInst *AI = dyn_cast(I1)) return AI->getAllocatedType() == cast(I2)->getAllocatedType() && - (AI->getAlignment() == cast(I2)->getAlignment() || + (AI->getAlign() == cast(I2)->getAlign() || IgnoreAlignment); if (const LoadInst *LI = dyn_cast(I1)) return LI->isVolatile() == cast(I2)->isVolatile() && - (LI->getAlignment() == cast(I2)->getAlignment() || + (LI->getAlign() == cast(I2)->getAlign() || IgnoreAlignment) && LI->getOrdering() == cast(I2)->getOrdering() && LI->getSyncScopeID() == cast(I2)->getSyncScopeID(); if (const StoreInst *SI = dyn_cast(I1)) return SI->isVolatile() == cast(I2)->isVolatile() && - (SI->getAlignment() == cast(I2)->getAlignment() || + (SI->getAlign() == cast(I2)->getAlign() || IgnoreAlignment) && SI->getOrdering() == cast(I2)->getOrdering() && SI->getSyncScopeID() == cast(I2)->getSyncScopeID();