aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2022-12-12 16:37:51 +0000
committerGuillaume Chatelet <gchatelet@google.com>2022-12-12 16:38:18 +0000
commit3bbfaee23d41c099547c652f87b252ab6e1f6c46 (patch)
tree58824c49cb66eabbfce741129704f562fb3f6110 /llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
parent56fd846f370adf16bea333b12637038ea2f3c225 (diff)
downloadllvm-3bbfaee23d41c099547c652f87b252ab6e1f6c46.zip
llvm-3bbfaee23d41c099547c652f87b252ab6e1f6c46.tar.gz
llvm-3bbfaee23d41c099547c652f87b252ab6e1f6c46.tar.bz2
[reland][Alignment][NFC] Remove access to deprecated GlobalObject::getAlignment from llvm
Differential Revision: https://reviews.llvm.org/D139836
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCMIPeephole.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCMIPeephole.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp b/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
index 605b2d2..1b79774 100644
--- a/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+++ b/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
@@ -843,7 +843,7 @@ bool PPCMIPeephole::simplifyCode() {
if (SrcMI->getOperand(1).isGlobal()) {
const GlobalObject *GO =
dyn_cast<GlobalObject>(SrcMI->getOperand(1).getGlobal());
- if (GO && GO->getAlignment() >= 4)
+ if (GO && GO->getAlign() && *GO->getAlign() >= 4)
IsWordAligned = true;
} else if (SrcMI->getOperand(1).isImm()) {
int64_t Value = SrcMI->getOperand(1).getImm();