[llvm] f5687e0 - [NFC] Use getAlign() instead of getAlignment() in haveSameSpecialState()

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 13:20:02 PST 2021


Author: Arthur Eubanks
Date: 2021-12-09T13:19:42-08:00
New Revision: f5687e0fd0d6a4b276cb638871c4d5c10e5139f7

URL: https://github.com/llvm/llvm-project/commit/f5687e0fd0d6a4b276cb638871c4d5c10e5139f7
DIFF: https://github.com/llvm/llvm-project/commit/f5687e0fd0d6a4b276cb638871c4d5c10e5139f7.diff

LOG: [NFC] Use getAlign() instead of getAlignment() in haveSameSpecialState()

getAlignment() is deprecated.

Added: 
    

Modified: 
    llvm/lib/IR/Instruction.cpp

Removed: 
    


################################################################################
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<AllocaInst>(I1))
     return AI->getAllocatedType() == cast<AllocaInst>(I2)->getAllocatedType() &&
-           (AI->getAlignment() == cast<AllocaInst>(I2)->getAlignment() ||
+           (AI->getAlign() == cast<AllocaInst>(I2)->getAlign() ||
             IgnoreAlignment);
   if (const LoadInst *LI = dyn_cast<LoadInst>(I1))
     return LI->isVolatile() == cast<LoadInst>(I2)->isVolatile() &&
-           (LI->getAlignment() == cast<LoadInst>(I2)->getAlignment() ||
+           (LI->getAlign() == cast<LoadInst>(I2)->getAlign() ||
             IgnoreAlignment) &&
            LI->getOrdering() == cast<LoadInst>(I2)->getOrdering() &&
            LI->getSyncScopeID() == cast<LoadInst>(I2)->getSyncScopeID();
   if (const StoreInst *SI = dyn_cast<StoreInst>(I1))
     return SI->isVolatile() == cast<StoreInst>(I2)->isVolatile() &&
-           (SI->getAlignment() == cast<StoreInst>(I2)->getAlignment() ||
+           (SI->getAlign() == cast<StoreInst>(I2)->getAlign() ||
             IgnoreAlignment) &&
            SI->getOrdering() == cast<StoreInst>(I2)->getOrdering() &&
            SI->getSyncScopeID() == cast<StoreInst>(I2)->getSyncScopeID();


        


More information about the llvm-commits mailing list