[PATCH] D77078: [Alignment][NFC] Simplify IRTranslator::getMemOpAlignment
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 23:58:06 PDT 2020
courbet accepted this revision.
courbet added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:249
+ return SI->getAlign().getValueOr(DL->getABITypeAlign(ValTy));
} else if (const LoadInst *LI = dyn_cast<LoadInst>(&I)) {
+ Type *ValTy = LI->getType();
----------------
you can now remove all the else if statements:
```
if (const StoreInst *SI = dyn_cast<StoreInst>(&I)) {
return ...;
}
if (...) {
return ...;
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77078/new/
https://reviews.llvm.org/D77078
More information about the llvm-commits
mailing list